Animation transition delay when button is held and released
I'm trying to set up an attack animation so that it plays to completion and goes back to idle if you tap a button, but also if you hold the button down it plays the animation to completion and holds the final frame of the animation until you release then it goes back to idle.
The problem is when the button is held there will be a delay before it starts the transition. If I uncheck "Has Exit Time" on the attack->idle transition then it doesn't complete the animation unless I hold down the button, which is not what I want.
Anyone encountered the same problem before?
I came up with a solution that feels hacky, which is to create an automatic transition to the last frame of the attack animation as a "hold" state and from that hold state the transition to idle can uncheck "has exit time", thus giving me the instant response I was looking for. Just not sure if that's a good way to go about it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613014714im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Whole rig moves down on transition between two animations. 0 Answers
Time delay enemy respawn 3 Answers
Open Door Animation Problem 0 Answers