Applying root motion to parent

Hello!

I’m having some huge issues with applying root motion to a parent. A solution I found was to do something along these lines:

        void OnAnimatorMove()
        {
            myparent.transform.position += animator.deltaPosition;
        }

However, this deltaPosition is affected by the “snap” that happens after a animation has played. In other words, after the animation that involves root motion has completed, the character snaps back in place. Definitely not what I want.

Is there any way to avoid this?

Thanks
Josh

That sounds like the correct solution to me. I’m planning on adding exactly that to one of the Animancer examples and I can’t see any reason it wouldn’t work.

Does the snap occur if you just apply it to the child normally? What about with regular root motion without that method at all?

Does the delta position actually give a huge value on the last frame?

1 Like

For whatever reason, after returning to this now it works. The only thing I that I can think of is that I downgraded from 2019.14 to 2019.13. Not sure what happened there.