CNA Samples

Inverse Kinematics

Ported from Microsoft's XNA 4.0 Inverse Kinematics sample.

Source for this sample on GitHub ↗

A cat above a shaded cylinder chain reaching toward it on a blue background, with simulation controls at left. Play ▸

Opens in a new tab.

About this sample

A 20-link cylinder chain uses cyclic coordinate descent to reach the cat you move. The original also applies the same algorithm to an Xbox LIVE avatar when its renderer is ready; the browser shows the cylinder chain because that avatar service is unavailable on this platform.

Controls

ActionControl
Pause or resume the simulationP
Toggle single-step modeEnter
Advance one stepSpace
Move the catW, A, S, D
Move the cat toward or away from the cameraQ and E
Rotate the cameraArrow keys
Zoom the cameraZ and X
ResetR
ExitEscape