- Home /
The question is answered, right answer was accepted
Why don't my animations immediately change in Unity 2D?
I am using Unity 2d to make a platformer game. However I am having trouble with my animations. In my Animator I am using transitions to move between animations. The problem is that my animations don't immediately change. The transition arrow glows and the glow moves to the end (kind of like the status bar on an animation) and my animations only change when the arrow is fully glowing. This causes trouble in my game because when you start to move it will show the "Idle" animation for a while before switching to the "running" animation. Why is this happening and what do I need to do to fix it? (I just started using Unity a couple of months ago so I'm a beginner)
I had the same problem but I fixed it by disabling 'Has Exit Time' when I clicked the transition lines
Answer by meat5000 · May 29, 2014 at 01:23 AM
Click the transition arrow and adjust the Width of the two triangles that define the transition period, above the two blue bars that represent the two animations.
Exit Time will define when this period begins so sliding the two arrows left or right together will have no affect, only the distance between the two.
Answer by Clet_ · May 29, 2014 at 01:22 AM
Take a look into your transitions conditions. YOu probably have a condition saying ExitTime | 0.9 or something similar. Remove that condition and add one that say something like IsMoving | true.
You can then set that variable to true in your script whenever your character starts to move, and false when it stops
For idle->run transition, you shouldn't wait for the end of the idle animation.
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Zero-Out Animation Transition 1 Answer
Animator does not reset well when reactivating object 3 Answers
2D Animator Component makes my player stuck in space 0 Answers