- Home /
Question by
reale · Jul 08, 2015 at 10:22 AM ·
root motion
apply rootmotion on OnAnimatorMove()
so hey guys I got a funny problem here: I'm using Unity NavMesh for my AI so I have to use OnAnimatorMove() to control my AI's movement speed, so far there is no problem.
However, my AI now have variations in its movement, one of them is the leaping animation which has root motion in it. Because my AI's root motion already 'handled by script', is there a way to use use rootmotion inside OnAnimatorMove() or is there a way to disable OnAnimatorMove() ?
Comment
Answer by reale · Jul 09, 2015 at 06:30 AM
found the answer, i just need to put transform.position = anim.rootPosition;
$$anonymous$$ay be better for physics is to calculate velocity & set it to rigid-body.velocity ins$$anonymous$$d of set transform.position directly
Your answer
![](https://koobas.hobune.stream/wayback/20220611230318im_/https://answers.unity.com/themes/thub/images/avi.jpg)