What if your character's feet never slide again, just by letting the animation do the moving?
Why Root motion in Unity? - Purpose & Use Cases
Imagine you are making a game where a character walks and runs. You try to move the character by changing its position in code while playing animations separately. It feels like you have to control two things at once: the animation and the movement.
Manually syncing the character's movement with its animation is tricky and slow. If you move the character too fast or too slow, the feet might slide on the ground or look unnatural. Fixing this by hand takes a lot of time and can still look wrong.
Root motion lets the animation itself control the character's movement. The character moves exactly as the animation shows, so the feet stay planted naturally. This removes guesswork and makes movement smooth and realistic without extra coding.
character.position += direction * speed * Time.deltaTime;
animator.Play("Run");animator.applyRootMotion = true;
animator.Play("Run");Root motion makes character movement perfectly match animations, creating smooth and believable actions with less effort.
In a game, when a character climbs stairs or jumps, root motion ensures the movement matches the animation exactly, so the character doesn't slide or float unrealistically.
Manually syncing movement and animation is hard and error-prone.
Root motion lets animations drive the character's movement automatically.
This creates smooth, natural motion with less coding work.