Expand description
Inverse kinematics on top of a playing clip, for humanoid rigs (crate::humanoid):
- Feet on the ground. Each foot is traced down onto the real colliders; the hips drop for the lower foot and each leg bends (two-bone IK, the knee stays in its plane) so the foot stands on stairs, slopes and kerbs instead of floating or sinking. The clip’s own foot lift (a step) is kept. Needs physics, so it works in the running game.
- Looking at something. The chest, neck and head turn (20 / 30 / 50 %) towards a target, within a limit, easing in and out; a target behind the back is let go.
Add CharacterIk next to an crate::skeletal::Animator. In a script:
ctx.look_at_point(npc, Some(player_eyes)) or set look_at to an object’s name.
Structs§
- Character
Ik - IK settings of an animated humanoid.
- IkState
- What IK remembers between frames (smoothing).