function Update () {
if (Input.GetAxis("Vertical")) {
animation.CrossFade("Walk");
}
else {
animation.CrossFade("Idle");
}
if (Input.GetAxis("Horizontal")) {
animation.CrossFade("Walk");
} else {
animation.CrossFade("Idle");
}
}
what i want to happen is that if the player presses either the horizontal or vertical axis buttons, to play the walk cycle, and if not, play the idle. However when i use this script it will play the walk on the horizontal key presses but not on the vertical ones. How do I solve this?