Question by
Darkenno · Jun 04, 2020 at 02:06 AM ·
c#animationcharactercontroller
How I can do stop animation when the key let go?
I am doing a controller script for my character and I finally do my character play walk animation when key is pressed, now i dont know how to do animation stop when the key let go. The character Rig it's not humanoid is Legacy, her is the part of script: public void animationsplayercontrol() {
animation.Play("anim25");
if (Input.GetKeyUp(KeyCode.W) || Input.GetKeyUp(KeyCode.D) || Input.GetKeyUp(KeyCode.A) || Input.GetKeyUp(KeyCode.S))
{
animation.Play("anim10");
}
}
Comment