Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question How to make deterministic root motion?

Discussion in 'Animation' started by FrontBackItaly, Aug 22, 2020.

  1. FrontBackItaly

    FrontBackItaly

    Joined:
    Aug 1, 2013
    Posts:
    8
    Hi everyone, I'm writing a custom animation system and I'm implementing the root motion via an
    IJobParallelForTransform
    . What happens is that I compute the delta rotation/translation between the start frame and the end frame (I can do this because I baked the absolute rotation/translation values for each frame), and then apply it to the Transform.
    However, this method works just fine until I extend it to work with the Timeline. In fact, the problem lies in the transition between two clips and the root transform isn't rewound correctly.
    So my question is, how does the Unity engine roughly implement the root motion so that it's completely deterministic and, most importantly, rewindable?