Hi I am a beginner and would like to know how the script should look to start the animation when you press f.
Thank you.
this should get you going. Dude, you need to work through the documentation!
if(Input.GetKey("f")){
walk= true;
}
if (walk) {
animation.Play("walk");
}
thanks.
but don’t working. i need script when i press w start animation walk when i press space start animation jump…
Post what you’ve got Grow so we can see the code.
I think (!) your problem is that you animation.Play(“walk”) every Update(), which will start the animation every frame. Be sure to only start walking if you’re not walking yet.
code:
function Update () {
if (Input.GetKey(“w”)){
walk = true;
}
if (walk) {
animation.Play(“mixamo.com”);
}
}
and put it into a soldier. but when i press w animation don’t play
please help me. i need help
I am new to mixamo but:
animation.Play(“mixamo.com”);
everything in () is the animation witch are idle, walk, jump etc. mixamo.com is not an animation as far as I know unless you called an animation mixamo.com. Make sure you name it according to what your animation name is