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
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Specular lighting visible in a camera with Path Tracing when Preserve specular lighting is disabled in observed material
- Cinemachine package throws CS1061 errors in the Console when installed in a project that has HDRP and URP installed
- Editor.log file size grows rapidly when a scene exceeds the "Maximum Shadow on Screen" limit setting in the HDRP Asset
- Player build freezes after calling Application.Quit() when the scripting backend is set to IL2CPP
- Texture is not applied on a Custom Render Texture when a Cubemap is selected as the texture
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.