Search Issue Tracker

By Design

Votes

0

Found in

2017.4.0f1

2018.3.0a1

2018.4.0f1

2019.2.0a1

2019.3.0a1

Issue ID

1157328

Regression

No

The animation state changes without fully completing the Animation when transitioning to the next Animation

Animation

-

Steps to reproduce:
1. Open user-supplied project
2. Open "SampleScene" Scene
3. Select "AnimatedBar" GameObject
4. Open Animator Window
5. In the Animator select transition from "Play" to "Complete"
6. Play the Scene > Press spacebar to cause the filling bar Animation to play
7. In Inspector Window Expand Settings
8. Change Exit Time property to 1.1 or more > Press spacebar again

Expected result: Full Animation is played when exit time is set to 1
Actual result: The state exits without fully playing Animation when exit time is set to 1

Reproducible with: 2017.4.27f1, 2018.4.1f1, 2019.1.5f1, 2019.2.0b5, 2019.3.0a4

  1. Resolution Note:

    The Animator's transitions are designed to guarantee that the transition happens on the frame where the exit time threshold is crossed. This is done to make sure transitions between animations are as smooth as possible.
    If your previous time is 0.9 and the next one is 1.1, then your transition happened 0.1 in the past, and you are currently playing 100 of the new animation, and 0% of the previous. This design choice means that, depending on framerate, part of your first animation might not have played, but your next animation will be at exactly the expected time.

    If it is critical for you that the transition happens after the threshold has been crossed and that frame has played, then you have two options.

    You can use an animation event at t=exitTime and use that event to trigger a transition
    You can use a StateMachineBehaviour and check for stateInfo.normalizedTime > time in StateMachineBehaviour.OnStateUpdate and trigger a transition once the normalized time is greater than your selected time.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.