- Home /
Animation speed (backward)
I have an animation which moves camera from one point to another and i wanted to play it backwards. I have used "animation["name"].speed = -1" but when i play it, it moves immediately to target insted of moving backwards. Any tips? It only works as it should if i set my animation to loop, but it is looping, i want it to play only once. When i set it to play default/once it moves in instant.
animation["move"].speed = -1;
animation.Play("move");
Answer by homer_3 · Jan 10, 2015 at 07:54 PM
Supposedly, you can set animation[curAnim.realAnimName].normalizedTime = 1; But I've never been able to get that to work. Instead I do animation[curAnim.realAnimName].wrapMode = WrapMode.Loop; Unfortunately, this loops your animation. If you only want it to play in reverse once, you can periodically check the animation[curAnim.realAnimName].normalizedTime and once it's below .75 or whatever threshold, set the wrap mode to one of the single play options like WrapMode.Once.