Creating Locomotion Cycles (Walk, Run, Jump) for Games
Locomotion is not simply "a character walks." It is a set of animation states that work together through Blend Tree in Animator Controller, synchronized with root motion, processed through foot contact via IK, and transitions without sharp artefacts when speed changes. A poorly designed locomotion set makes a character slide, "swim," or twitch on transitions — and this is noticeable from the first second of gameplay.
Why Blend Tree is Better Than State Machine for Locomotion
A standard mistake is building locomotion through separate animation states in State Machine with cross-transitions. This looks normal in the Animator window, but in practice during the transition idle → walk → run, you need to manage three transition thresholds and crossfade time, and any change to the speed parameter creates a noticeable blending artefact.
1D Blend Tree by Speed parameter solves this elegantly: Unity interpolates between idle, walk, run, and sprint along a single axis, normalizing weights automatically. Threshold 0 — idle, 0.5 — walk, 1.0 — run, 2.0 — sprint. Thresholds are set through Compute Thresholds → Velocity Z, which automatically calculates values based on root motion velocity in each clip.
2D Blend Tree (Simple Directional or Freeform Directional) adds a second axis — Strafe. This is needed for shooters and action games where the character moves in 8 directions. Here it is important to set the central point correctly (0, 0) — it should reference the idle clip with zero movement, otherwise blending during diagonal movement gives incorrect weight.
Root motion is a separate issue. If animations are made with root motion (character movement is encoded in root bone movement), you must observe: identical step length between walk and run (otherwise foot sliding during blend), correct bake axes in Unity (Apply Root Motion → Bake Into Pose for vertical and horizontal axes depending on the project). For walk cycle, the length of one cycle in Unity is calculated through Loop Pose + Cycle Offset — and if the clip is not looped perfectly, there will be a visible "bounce" at the end of the cycle.
What is Included in a Locomotion Set for a Typical Game
The minimum set for a third-person action character:
- Idle (2–3 variants with additive breathing layer)
- Walk forward / backward
- Run forward
- Sprint
- Strafe left / right (walk and run)
- Jump start / in-air / land (heavy and light landing)
- Turn in place (45°, 90°, 180° — needed for Foot IK correctness)
For mobile projects, the set is often reduced to 6–8 clips with aggressive blending. For AAA projects, add: crouch locomotion, prone, climb transitions, root motion for turns.
Jump is separate. It is not a single clip, it is three or five states: anticipation → take-off → peak → descent → land (+ heavy land at high speed). Transitions between them are managed through parameters IsGrounded and VerticalVelocity, which are calculated by CharacterController or Rigidbody. If the transition from in-air to land has a fixed duration instead of Exit Time = 0 + conditional trigger, landing will lag or be interrupted.
Foot IK and Contact Points
Without Foot IK, the character will sink into rough terrain or float above it. Unity Animation Rigging package provides Two Bone IK Constraint for legs — this is the preferred approach in Unity 2022+. The old approach through OnAnimatorIK + animator.SetIKPosition works, but is less flexible when switching between multiple rigs.
Correct Two Bone IK setup: Effector target is a transform that Raycast pulls to the terrain surface. Hint target is the knee position. Weight is managed by a curve depending on the step phase (when the foot leaves the ground weight → 0, when in contact → 1). Without this curve, IK will jerk the leg when lifting.
Foot contact frame in walk cycle is important: exactly at the frame when the foot should touch the ground, it should be at a point with zero vertical velocity. This is called the foot plant frame, and it must be set through Loop Pose curves or manually in the animation editor.
Work Process
First — analyze references and agree on key parameters: walking and running speed (units per second), jump height, movement style (heavy soldier vs. light ninja). Then block key poses in Maya or Blender with test FBX export to check mapping in Unity.
After blocking approval — spline interpolation and fine work with secondary movements: arm swing, head bob, torso rotation. Final stage — integration into Animator Controller, Blend Tree parameter setup, foot IK test, loop points check and transition timing.
| Scale | Timeline |
|---|---|
| Minimum locomotion set (6–8 clips) | 3–7 days |
| Full set for action game (15–20 clips) | 2–4 weeks |
| With Animator integration + IK setup | +3–5 days |
| Locomotion for non-humanoid character | 3+ weeks |
Cost is determined after clarifying the number of clips, character style, and integration requirements.





