function Update ()
{ {if (Input.GetButton("Forward")) animation.Play ("walk"); if(Input.GetButton("Backward")) animation.Play ("walk"); if(Input.GetButton("Left")) animation.Play ("walk"); if(Input.GetButton("Right")) animation.Play ("walk");} else animation.Play("idle"); }
I'm new to all this, so there's probably a really obvious solution, but "walk" animation only plays when "right" button is pressed.