How to stop already started transition in the animator and run next animation immediatley
I'm new to Unity and I have a problem with animator.
I have a pretty simple scheme: 3 animations, Idle, Run and Attack, and 2 parameters: float RunSpeed and trigger Attack.
When my character is running and I press attack button I want the character to stop and play attack animation (character cannot attack while running).
But I have such problem: The character is running, then I release Running button and animator starts Run-Idle transition. Then I immediately press Attack button but animator first finishes transition and only after that it starts attacking animation. As a result there is a short delay between I press attack button and the beggining of attack animation.
I already tried to add transition between "Any State" node and Attack, but it did not help.
How can I discard already runned transition and start attacking animation immediately?
Your answer
Follow this Question
Related Questions
Animator problems with transition 1 Answer
Why is the animation clip preview different than ingame? 0 Answers
Animation Running Game 0 Answers
Trying to change an animation with a UI button 2 Answers
Kick bool being blocked by Ground bool 0 Answers