- Home /
Question by
DTJ Productions · Apr 21, 2010 at 01:13 AM ·
animationplaystopwalking
Walking Animation
Hey I want it so when my character walks the animation starts, and when he stops so does the animation.
Comment
Answer by spinaljack · Apr 21, 2010 at 01:17 AM
var isWalking: boolean;
function Update(){
if (isWalking){
animation.Play ("walk");
} else {
animation.Stop("walk");
}
}
Something like that, dropped on the model. Here's the documentation
You'll have to say when the model is walking with your movement script and you need an animation called "walk"
I added the script to my characters moving script and no error happened and the animation didn't turn on.
Try reading the manual: http://unity3d.com/support/documentation/$$anonymous$$anual/Character-Animation.html $$anonymous$$akes sure the animations are named and setup correctly