play animation in reverse

hello all,

i am new with the character animations.
and i am trying to play the character animation in reverse.

i had tried the Animation.Rewind() and Animation.addClip()

but both of them does not help me at all.
can any one help me with the animations.

Thanks in Advance!
Niki.j

You need to set the clip to normalizedTime = 1 and speed = -1. At least that’s for 3.5.6 I don’t know if 4 changed anything in that regard.

Hello AcidArrow…

thanks for the suggestion.
i am using unity 3.4.2,and i tried this,but it works only after completing the forward animation first.

i want to play the animation in reverse only.i don’t want it to play forward and then in reverse.
i also tried it by splitting the animation and setting the frames in reverse i.e from 60-0,but still it does not help.

please let me know if you ever been tried for this.

Thanks again!
Niki.j

Just open unity help and reffered “AnimationState.speed”. There you can find detail about playing reverse animation. There is also one example code for that.

“AnimationState.Speed” also getting useful only after playing the animation in forward direction first.
i do not want to play the animation in forward at all.
animation must start from the last frame and it must finish at very 1st frame.

If still relevant - Before playing try:
animation[“name”].time = animation[“name”].length;