Answer the question
In order to leave comments, you need to log in
How to interrupt animation playback in Unity?
There is a 2D character with sprite animation. When you press the key, the character moves, so the animation is played, but when the key is released, the animation does not stop until it is played to the end. GetComponent().enabled = false and GetComponent().speed = 0, as I understand it, stop the animation on the current frame, but you need to stop it and return to the initial frame. Anyone can help?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question