- Home /
How To Play animation in Reverse?
i want to play animation in reverse please help me
i Resolve this problem once i play the animation in reverse then i can not play that in normal terms.
so when you are playing the animation in reverse you have to play animation in forward differently
For Forward: GameoObjectName.animation["Animation"].speed= 1; GameoObjectName.animation.Play("Animation");
For Reverse:
GameoObjectName.animation["Animation"].speed = -1; GameoObjectName.animation["Animation"].time = cams.animation["Animation"].length; GameoObjectName.animation.Play("Animation");
this will work. Hope this help you
Answer by Unity beginner · Sep 27, 2013 at 12:01 PM
hand.animation["bridge"].speed = -1;
hand.animation.Play("bridge");
sorry but I'm a rookie, and place the script [animation] does not work in variables Animator and Animation ..... I can put like this: myanimation.speed = -1; but do not change the value of spped at any time but the script errors not present ......
myanimation variable:
Void start() { myanimation=gameobject.getcomponent(); }
This answer is for the Legacy 'Animation' component.