Search Unity

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?