Okay I have been working on this for hours trying to fix it!
So firstly I should mention I’m using UFPS.
I have my model with animations hooked up with idleanimation and walkanimation, all work in the preview wrap mode set to loop on both. The models rig is set to legacy.
I have an animation on the camera and the script to go with it is.
Something simple just to test it.
It simply does not work I feel like its supposed, but doesn’t. If I delete the animations the script tells me it cant find the animation meaning its working. No errors when the animation is on the camera. Yet no animation plays!?
function Update () {
if(Input.GetKey("w")) {
animation.CrossFade("walkanimation");
}
else if(Input.GetKey("a")) {
animation.CrossFade("walkanimation");
}
else if(Input.GetKey("d")) {
animation.CrossFade("walkanimation");
}
else if(Input.GetKey("s")) {
animation.CrossFade("walkanimation");
}
else
animation.CrossFade("idleanimation");
}