Marrow Open Marrow

Guides

Root motion or in place: which animations do you need?

By bxzex · · Updated

A walk can move the character forward through the world, or walk on the spot like a treadmill. Which one you want depends on what moves your character: the animation or your code.

Root motion or in place: which animations do you need?: a character rigged and animated in Marrow

Root motion

The animation carries the hips forward, so the character really travels. The engine reads that movement and moves the character's body to match.

In place

The hips stay over the same spot and the legs walk underneath. Your character controller moves the character.

Getting each one from Marrow

Animations that travel (walks, runs, crawls, jumps forward) can use the In place switch in the animation settings. Turn it on before you add the animation to the pack and that take is downloaded walking on the spot. Leave it off to keep the travel for root motion. You can put both versions of the same walk in one pack.

In each engine

Match the speed so the feet do not slide

With in-place clips, your code has to move the character at the speed the legs are walking. You can measure that speed:

  1. Play the travelling version of the walk and note how far it goes and how long it takes.
  2. Divide distance by time. A relaxed walk is about 1.3 metres per second, a jog about 3 and a sprint 6 or more.
  3. Move the character at that speed, or change the playback rate: at 1.5 times the speed, play the clip 1.5 times as fast.

Shorter characters have shorter strides. Marrow scales travel to leg length, so a small knight covers less ground per step than a tall person in the same clip.

Mix both in one game

Many games use in-place clips for walking and running, where the player expects instant control, and root motion for attacks, dodges, climbing and finishing moves, where the distance has to match the animation. Most engines let you switch per clip or per state.

Multiplayer and root motion

When the animation moves the character, every player’s computer has to agree on exactly which frame is playing. That makes root motion harder to keep in step over a network. If your game is online, start with in-place movement and only use root motion where it earns its place.

Questions

What does In place do to a jump?

It removes the travel along the ground and keeps the up and down motion, so the character still leaves the floor.

Which one do I need for a render or a short film?

Root motion. The character walks through the scene with the feet planted, and there is no code to fight with.

Some animations have no In place switch. Why?

They do not travel. An idle, a wave or a punch on the spot has nothing to remove.

Open Marrow