- Home /
NavmeshAgent animations to rotate
I am trying to make animations move according to animations in unity. I am trying to make the agent rotate itself from animation, the animations are taken from standard assets from the third person animator. With that I created my on blend tree that uses rotation and velocity as parameters and includes the animations that rotate 45 left,45 right, 90 left, 90 right and the corresponding walking animations for each angle.
The problem is that I can't manage to sync the agent rotation angle with the animation. I have already tried getting the angle of rotation according to agent.nextPosition
but it does not help. Whenever the agent must rotate 180 degrees he does not play the desired animation. I can't find a way to accomplish this. I was thinking to basically stop the agent's rotation and enable root motion and than disable it back but how can I now when he is going to make 90 degree turn for example. I searched the web and did not find any concrete tutorials on how to manage to rotate agent with animation. This tutorial https://docs.unity3d.com/Manual/nav-CouplingAnimationAndNavigation.html does not provide rotation to character. Thus, when the agent is rotating he is walking and rotating from transform at the same time. I don't want that. I want a way to make the movement look realistic.
Your answer
Follow this Question
Related Questions
Quaternion to Matrix conversion failed (5.3.4p5) 2 Answers
Root Animations are inaccurate 0 Answers
Animation and Nav Mesh Agent - rotation problem 1 Answer
RotateTowards won't rotate in X axis 0 Answers