- Home /
 
reverse an animation if it's less than half way through?
How do i reverse an animation if a key is released and it's less than half way through playing?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Kleptomaniac · Apr 09, 2012 at 07:00 AM
Let's just say you're animating a walk cycle:
 if (Input.GetKeyUp(KeyCode.W) && animation.isPlaying("walk") && animation["walk"].time < animation["walk"].length / 2) {
     animation["walk"].speed = -speed;
 }
 
               I believe that should work.
Hope that helps, Klep
Your answer
 
             Follow this Question
Related Questions
Flip back a frame 1 Answer
[Solved] Reverse animation 1 Answer
How to stop a FBX animation mid-way and then reverse it from that point? 1 Answer
Help making an animated door (c#) 2 Answers
Play animation backwards 1 Answer