The problem i have is that when i connect my code to the game object (Main character) the animation plays when i hit "d" but only plays for how long i have the button pressed and that is what i want. but when i press "a" no animation att all also how would i add the wrapmode.loop to this code any help is very appriciated
here is an example of my code `function Update () {
if (Input.GetKey(“d”)) {
animation.CrossFade(“Walk”);
}
else {
animation.CrossFade(“Idle”);
}
if (Input.GetKey(“a”)) {
animation.CrossFade(“Walk”);
}
else {
animation.CrossFade(“Idle”);
}
if (Input.GetKey(“jump”)){
animation.CrossFade (“Jump”);
}
else{
animation.CrossFade(“Idle”);
}
}`
But what i would also like is that when i hit jump i want the whole animation to play but i have tried Input.GetButtonDown but didn't work
if you can help please let me know through here or skype johnesslemont012