- Home /
The question is answered, right answer was accepted
How can I make my guy stop running?
My character's running animation plays continuously in a loop, over and over, no matter what he is doing e.g. standing, running, walking... I can't figure out how to change the animation to idle, walk, etc... or stop the animation altogether.
Answer by clunk47 · Dec 10, 2012 at 05:47 AM
You need to post up your code. Otherwise we can't really see what you're needing specifically to be fixed. Use conditions, or if() statements. Here are some examples of commands you could use.
bool isRunning;
if(isRunning)
animation.CrossFade("run", 0.5f);
else if(!isRunning)
animation.CrossFade("idle", 0.5f);
You also need to experiment around with animation.Stop();, animation.Play().... Check the script reference for more detailed information on animations.
Follow this Question
Related Questions
Animator is looping 1 Answer
Having some animation trouble 2 Answers
2D Animation does not start 1 Answer
Running animation 1 Answer
What is the proper way to wait for an Animator Controller to update? 1 Answer