Hi all
My question upfront: what are the ways the animation preview window can differ compared to the game regarding root motion?
I’ve put together an animation system using the playables API, an empty animator being the output node:
I am using its root motion via script…
…which simply says:
private void OnAnimatorMove()
{
animator.ApplyBuiltinRootMotion();
}
It was more complex, but I am trying to find the answer to my question above.
Now, the animation that I am using is simply prone turn from Mixamo (Humanoid) that in the animation preview window looks like this:
But in the game, it jumps back after 55 frames (its length):
Its average angular Y speed is 23.9 deg/s as per the importer and it has a root rotation:
Now my question: why does the preview window show me a repeating animation, but the game does not when using ApplyBuiltinRootMotion
? What does the preview window do differently than the function? My assumption was that the root translation and rotaton would be applied to the (soldier’s) transform and when it repeats, it would continue applying it so that it would not jump back. What confuses me most is that it simply works for the preview window (when I select the clip and press play on the preview window).
Note: I have been using 2018.3 and 2019.1, latest, each.
Many thanks in advance for any help or pointers where to look! Happy to provide more info
Florian