Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

How is working with root motion supposed to work?

Discussion in 'Timeline' started by Baste, Mar 16, 2020.

  1. Baste


    Jan 24, 2013
    Because the workflow now is really cumbersome. Using 2018.4.

    I'm combining a bunch of clips with root motion in a track, and obviously I want the position and rotation from the last clip to be kept in the next clip.
    What I have to do now is this:
    1 Select the track, make sure it's set to "Apply Scene Offsets" instead of "Apply Transform Offsets". I don't understand what any of those are supposed to mean, by the way.
    2 Click each clip in order, and select "Match offsets to previous clip".
    3 If I ever move any of the clips, or add any, I have to repeat 2, because those values were written when I did 2, instead of setting a flag.

    I've got to be doing something wrong, but I can't make it work in any other way. What's the intended workflow here?

    I also don't understand what "Offsets Match Fields" or "Remove Start Offsets" does. I've read the tooltips and the docs, but I'm not grasping anything here.

    Why do we have to do anything? I thought it would be obvious that if I combined two clips with root motion on a track, I wanted that to work like combining root motion clips anywhere else does.
  2. seant_unity


    Unity Technologies

    Aug 25, 2015

    Apply Scene Offsets - starts the animation from the current position in the scene. This is useful when the character should start animating from where they currently are, similar to the animator controller.
    Apply Transform Offsets - the starting position & rotation is fixed. At run-time the character will always play EXACTLY at the same position & rotation regardless of their current position/rotation.

    (Note that timeline only ever writes local position & rotation. So if the character is parented then it plays relative to the parent).

    Match offsets:

    Yes, your observations for 2&3 is correct, there is no auto-match offsets to the previous clip. A suggestion is to here is to double click the track to select all clips, then right click on a clip and use the 'Match Offsets to Previous Clip'.

    Remove Start Offsets:

    If the root motion of the animation does not start at the origin, this modifies the curves so that it does. This is on by default for non-recorded clips, to help align their root motions and avoid jumps in the clips. For recorded clips it is off by default so that the keys playback exactly as keyframed.

    Match Offset Fields:

    These are used with 'Match Offsets to Previous/Next Clip' operations to mask out certain fields. E.g. you want to match x&z but not y.

    I hope that helps.
  3. Baste


    Jan 24, 2013

    Thanks for that. The double-click to select all clips will help a bunch.

    I'm still wondering why it was made like this, though. Why isn't "keep the position of the animated character from the last clip" the default behaviour? Why does the offset positions have to be written to the asset?