Hi
I have a variety of animations which I wish to play with a button press
I want a ‘jet pack’ animation to play and then a ‘hover’ animation on a button press and then a ‘deactivate jet pack’ animation on the same button press.
This is the script I have so far:
var activated = false;
function Update()
{
if (Input.GetButton(“jetpack”))
{
activated = !activated;
if (activated)
animation.Crossfade(“jetpackActivate”);
else
animation.CrossFade(“jetpackDe-activate”)
}
}
However, it seems to be a little sketchy and doesn’t always work!
Any help would be amazing!
Thank You