- Home /
Rotate Mecanim animation during Navmesh path finding.
So I have a mecanim animator with only 1 locomotion animation, I would change direction this way.
Vector3 targetDirection = mainCam.cameraRotation * new Vector3(horizontal, 0f, vertical);
With horizontal and vertical my analog axis, now I want my AI to be able to navigate through navmesh but without using rotating animations, just 1 animation. But I have no idea how to change its rotation while walking, it just seems to go straight and get stuck on something. What should I do?
Sounds like you need to avoid using root motion and ins$$anonymous$$d get the animation to match up with the movement speed of the character - move the character yourself and feed this info into mecanim to play the animation at the right speed.
I'm using navmesh for path finding for my AIs, in most of tutorials AIs are given many turn by degrees animations, I would like to avoid them and rotate them in scripts at path points, I have no idea how to do that.
Your answer
Follow this Question
Related Questions
Navmesh agent stops playing animation. 0 Answers
Mecanim Animation Jitters when NavMesh Agents Collide 0 Answers
Animation driven NavMeshAgent with Speed, AngularSpeed and Direction as parameters. 1 Answer
Teddy Bear Mecanim NavMesh (my animations don't work) 0 Answers
How to move NavMesh Agent by animation? 2 Answers