- Home /
How to play an animation in reverse?
Hello! I wanted to ask, how can I play an animation in reverse in my animator? When my object is on the ground, it's doing idle animation, when it starts flying, it does animation1 without looping (to change children sprites positions). When it does the transition from idle to animation1, it does it perfectly, but when it does it in reverse (to go back to idle), it ignores all keyframes and curves and just moves all sprites to the idle position (it does not change them instantly, it just ignores keyframes and curves, goes in straight line). So, how can I play my animation in reverse? Is there a way to do it without code, maybe?
Answer by smoggach · Feb 12, 2015 at 04:02 PM
Set the time Speed of the mecanim state to -1 and it will play reversed.
Yeah, but if I set my animation speed to -1, my animation does not even start when it should, I need an animation to be reversed only when back transition is made. Should I do that by code? Thanks
Very hard to understand your english. Here is an example of what I mean:
State 1: $$anonymous$$otion: your_animation Speed: 1
State 2: $$anonymous$$otion: your_animation Speed: -1
If you've already got it that way then the problem is probably in your transition to the reversed anim. It's not really ignoring your curves it's blending them because the transition takes the entire length of the animation.
Ok, now I got it. I did it in that way... I don't know if there is a smarter way, but anyways, this works:
Thank you very much for your help and sorry for my bad english, I am sleepy today and have a headache...
Your answer
Follow this Question
Related Questions
Customizable characters with sprites in 2d 0 Answers
Help With Animation Play Back - Reverse 1 Answer
Animated Overlay Armor Sprite 1 Answer
Best Practices on 2D Animation? 1 Answer
What's the best art pipeline for 2D animated sprites? 1 Answer