- Home /
OnAnimatorMove() is freezing
Hi, I've a problem with the OnAnimatorMove() function. The function set the parent position and rotation but it does it jerky.
void OnAnimatorMove()
{
Animator animator = GetComponent<Animator>();
transform.parent.rotation = animator.rootRotation;
transform.parent.position += animator.deltaPosition;
}
And if I set this into the update loop, it makes a Bayblade spinning top. x) (video) https://cdn.discordapp.com/attachments/793873256239071242/902864565929402398/Desktop_27-10-2021_12-20-42.mp4
How I am supposed to do to avoid this problem?
Answer by Sofiane-Lasri · Oct 27, 2021 at 10:41 AM
I found the issue, I had to choose "Animate Physics" in the animator's Update Mode.
Your answer
Follow this Question
Related Questions
Why does the root motion animation make the prefab move in the opposite direction? 0 Answers
How can I get Additive Animation Layers to work with Root Motion? 0 Answers
Unity Mecanim not applying Mixamo Animation Root motion on XZ 1 Answer
Rotate a box 90 degrees with Root Motion 0 Answers
Animation transition doesn't preserve root transform XZ setting 0 Answers