Animation is taking too much time to start playing

I have a animation controller with an aim animation and a bool “firing” parameter. In the script I set the parameter to true if the user clicks the right mouse button, which triggers the animation. The problem is that after the click, the animation is taking too much time to start playing (from one second to 3 seconds, some times). I tried to move the code to LateUpdate and FixedUpdate, with no improvement. Is there a way to make the animation play immediately after the click? (I’m using Final IK to control the character)

1 Like

Is another animation running when you set your bool? Could this animation have an Exit Time? Then it will play all the way through until a state change can occur. Also, set Fixed Duration and Transit Duration to zero. Then your firing animation should be able to interrupt the animation that is playing immediately.

4 Likes

The “Exit Time” was interfering with the transition from one animation to another. Unchecking it solved the problem. Thank you for the reply.

1 Like