- Home /
Animator - Transition in middle of animation
I've created an animation in the Animator with a couple of states (walking and idle). I have a boolean parameter called isWalking
which triggers the transitions between the idle
and walking
states.
However, when I set isWalking
to true, it waits until the idle
animation is finished before transitioning to the walking animation. I want it to begin the transition as soon as isWalking
is set to true.
Is there anyway I can make transitions activate immediately instead of waiting for the current animation to finish?
Edit: As requested, here is the code:
if (GetComponent<CharacterPhysics>().IsWalking())
{
GetComponentInChildren<Animator>().SetBool("isWalking", true);
}
else
{
GetComponentInChildren<Animator>().SetBool("isWalking", false);
}
However, I'm not sure how relevant the code is because I can see the value being changed properly in the Animator window, but it waits until the current animation is finished before transitioning (instead of transitioning as soon as the conditions for the transition are set)
Answer by Brad1011 · Nov 07, 2013 at 11:50 PM
Ended up finding the solution:
Removing the "Exit Time" trigger altogether achieves what I want to do and will change animations as soon as the other conditions are met.
Answer by soleshot · Jun 22, 2015 at 06:21 AM
Unity 5 - Uncheck "Has Exit Time"
Using the checkbox that appears when you look at a Transition in the Inspector window (in case you had to go looking for where this was; like I did).
Answer by TheRedGuy90 · Oct 23, 2017 at 10:18 PM
I dont have an Exit Time box, and my animations are slow.
Your answer
![](https://koobas.hobune.stream/wayback/20220613121423im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Use Mecanim Transition as Trigger 0 Answers
how can change speed transition between 2 states? 1 Answer
Is possible to choose the time when a state changes, during a transition in Animator? 0 Answers
What's the best way Unity Free users can disguise our level transitions? 1 Answer
Convert 3.x Plugins to Unity 4 0 Answers