- Home /
How can i swap default animation of AIThirdPersonController from Run to Walk?
I'm using the Standard Assets AIThirdPersonController with the default animations, and I'd like the character to walk instead of run. I was able to change default animation to walk from run in ThirdPersonController(Player Character walks by default now and if I hold Left Shift, it runs). How would I make the same change for AI to use the walk animation instead of the run animation as it moves around?
Answer by JxWolfe · Mar 31, 2019 at 02:12 PM
check the rigidbody's velocity. Figure out how fast it needs to move to be 'running' if the velocity is greater than that number, set the animation to run.
Answer by bariseken92 · Mar 31, 2019 at 03:16 PM
I have found the workaround messing with the inspector:
Adjusting Speed parameter under the Steering in the Nav Mesh Agent component gave me the result I wanted.
That's not a solution. The solution is setting up a proper animation tree and a proper AI script that adjusts nav agent speed based on distance from target, and feeds nav agent speed into animator so that animator can handle speed changes and blend the animation to running or walking. It's actually all very simple.
Your answer
![](https://koobas.hobune.stream/wayback/20220612194612im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Changing default animation of AI third person controller to walk? 0 Answers
Sharing some but not all animator states between characters 0 Answers
Any idea why my animation isn't working? 0 Answers
how to make multiple transition from one state? 1 Answer
Blending animations for a bow with differing charges 1 Answer