Animation
Root motion vs in-place animation: which to use in Unity, Unreal and Godot
What root motion and in-place clips are, when to use each, how to set both up in Unity, Unreal Engine 5 and Godot 4, and how to fix foot sliding.
By AssetLoom Team, published , 6 min read
Every humanoid animation pack has to answer one question: who moves the character, the animation or your code? Root motion lets the clip decide. In-place animation leaves it to your controller. Neither is better in general, but picking the wrong one for a clip causes most of the sliding, snapping and drifting people blame on the animation itself.
This guide explains the difference, when to use each, how to set both up in Unity, Unreal Engine 5 and Godot 4, and how to fix the common problems. The examples use our Locomotion Animation Pack, which ships every clip in both versions, on the free Rigged Mannequin Base Character.
What the two terms mean
A game-ready humanoid skeleton usually has a root bone on the floor, under the hips. The root is the character’s position in the world; everything else is the pose.
- Root motion: the root bone travels during the clip. A walk moves forward about a stride per step, a turn rotates the root, a lunge carries it half a metre. The engine reads that movement and applies it to the character, so the feet and the distance covered always agree.
- In place: the root stays at the origin and the body walks on the spot, like a treadmill. Your character controller moves the character, and you match the clip’s playback speed to the movement speed.
Which one to use
| Situation | Better choice | Why |
|---|---|---|
| Player locomotion that must feel instant | In place | Input changes velocity immediately; the animation follows |
| Starts, stops and turns on the spot | Root motion | The weight shift and the distance are part of the motion |
| Attacks with a step, dodges, knockdowns | Root motion | The hit lands where the animator put it |
| NPCs following a path | Either | Root motion looks more grounded; in place is easier to steer |
| Climbing, vaulting, getting into a vehicle | Root motion | The character has to arrive at an exact spot |
| Blend spaces with many directions | In place, or root motion with care | Blended root motion averages the travel of every clip |
Most projects mix the two: in-place cycles for responsive movement, root motion for the one-off moves where position matters. That is why our packs ship both. In the Unarmed Combat Animation Pack, for example, the dodges and the knockdown carry real distance in their root-motion versions, and in the Vehicle and Seated Animation Pack entering and exiting the car moves the root by 0.74 m so the character ends beside the door.
Unity
Unity handles both on a Humanoid rig. Root motion for Humanoid clips comes from the body’s centre of mass, not from a named root bone.
Root motion
- Select the FBX, open the Rig tab and set Animation Type to Humanoid. For clip files, set Avatar Definition to Copy From Other Avatar and pick your character’s avatar.
- In the Animation tab, tick Loop Time (and Loop Pose) for cycles. Under Root Transform Rotation and Root Transform Position (Y), tick Bake Into Pose for straight walks and runs; leave rotation unbaked for turns. Leave Root Transform Position (XZ) unbaked so the forward travel becomes root motion.
- On the Animator component, tick Apply Root Motion.
- If you move the character with a CharacterController or Rigidbody, add an
OnAnimatorMove()method to a script on the same object and applyanimator.deltaPositionyourself. When that method exists, Unity hands root motion to your script.
In place
Untick Apply Root Motion and move the character in code. Feed its speed into a blend tree parameter so the right cycle plays at the right speed.
Unreal Engine 5
Root motion
- Import the clips onto your character’s skeleton. Our UE5-named FBX files are in centimetres, so import them at scale 1.
- Open each Animation Sequence and, in Asset Details, tick Enable Root Motion. Root Motion Root Lock can stay on Ref Pose.
- In the Animation Blueprint, open Class Defaults and set Root Motion Mode. Root Motion from Montages Only is the default; choose Root Motion from Everything if state machine clips should move the character too.
- The Character Movement Component applies the motion. While walking or falling, the vertical part of root motion is ignored and gravity still applies.
Epic notes that root motion has a performance cost: with either mode on, the animation graph updates on the game thread instead of a worker thread. Use it where it earns its place.
In place
Leave Enable Root Motion off and let the Character Movement Component drive the character, with a Blend Space keyed on speed. If you only have root-motion clips, Force Root Lock pins the root so they play in place, though the feet will slide unless the playback speed matches.
Godot 4
Root motion
- Import the GLB or FBX, open Advanced Import Settings and map the skeleton with a BoneMap using SkeletonProfileHumanoid. Our rig’s bone names match the profile, so it fills automatically.
- On your AnimationTree (or AnimationPlayer), set Root Motion > Track to the root bone, for example
%GeneralSkeleton:Rootif the skeleton was made a unique node during import. - Each frame, read
get_root_motion_position()andget_root_motion_rotation()from the tree, turn the position into a velocity, and move your CharacterBody3D withmove_and_slide().
In place
Leave the root motion track empty, move the CharacterBody3D from input, and drive a BlendSpace1D or BlendSpace2D with its velocity.
Common problems
Foot sliding
With in-place clips, sliding means the playback speed and the movement speed disagree. Measure the clip’s speed once: our Locomotion pack lists it for every cycle (for example 1.40 m/s for Walk and 4.00 m/s for Run), so a character moving at 2.1 m/s should play Walk at 1.5× or blend towards Jog. With root motion, sliding usually means root motion is not being applied at all, so the clip and the controller are both trying to move the character.
The character snaps back at the end of a loop
A root-motion clip is playing without root motion turned on: the mesh walks away from its capsule, then jumps back when the clip restarts. Turn on Apply Root Motion (Unity), Enable Root Motion (Unreal) or the root motion track (Godot), or use the in-place version.
Twisted wrists or palms facing the wrong way
This is a retargeting problem rather than a root motion one: the clip was authored on a skeleton whose arm bones point or roll differently. See our guide to retargeting animations in Unity, Unreal Engine 5 and Godot.
T-pose vs A-pose
The rest pose doesn’t change how root motion works, but a mismatch between the clip’s skeleton and yours makes arms float or clip into the body. Our mannequin binds in an A-pose and includes a T-pose take; the retargeting guide shows how to tell each engine which pose to compare.
Quick check
Play a walk cycle with the skeleton visible. If the root bone moves forward, it is a root-motion clip. If it stays under the hips at the origin, it is in place.
Spotted a mistake or have a question? Email support@assetloom.io.