I have an AI in my 3D game that must go to a locker and then, open it.
It works but I have a problem with the transitions of the Animator.
The Animator has 2 states, Walk and OpenLocker. You only can go to OpenLocker if the parametre “Open” is true. When the character comes to the locker, “Open” = true, that makes the Animator go to the state OpenLocker.
The problem is that the Walk animation duration is 1 second, and if the character comes to the locker in the second 0.5 of the animation Walk, it waits 0.5 seconds more for the animation to end to pass to the OpenLocker state.
How can I make the transition instanlty? I want that if the character comes to the locker at the middle of the animation Walk, it stops immediately to pass to the OpenLocker state.