Hello all,
I have a script which simply transitions between 2 animations on a character when it moves forward by pressing the W key.
if (Input.GetKeyDown(KeyCode.W)) {
animation.CrossFade("flightFast", 0.2, PlayMode.StopAll);
} else if (Input.GetKeyUp(KeyCode.W)) {
animation.CrossFade("idle", 0.3, PlayMode.StopAll);
}
The script works, but here is the weird part:
The flightFast animation (a bird moving its wings) works fine, but when I go back to the idle animation the wings don’t go back to the original position, they stay where they were when the flightFast animation ended. But the idle animation IS being called because I can see the tail moving as it does in the idle animation, it’s just the #$% wings not going back to rest position.
Even weirder, I created another, much simpler, character to which I applied the very same script and this one does work, that is, the wings go back to the rest position.
I know it’s very hard for anyone to figure this out without looking at the animations, but I’m just wondering if someone has had this happen to them before? Both characters are animated in Maya, both using the trick of the @ sign on different scenes because unfortunately not all the animations are on the same scene.
I’m going a little crazy with this. I have tried reimporting the assets, resetting the animations, etc.
Any ideas would be appreciated, thanks.