Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.0.3
Issue ID
1310326
Regression
No
Abrupt offset in the Root Motion when using AnimationPlayableUtilities.Play() in comparison to manually updating PlayableGraph
Reproduction steps:
1. Open user's project "animation-root-glitch.zip"
2. Open "SampleScene" Scene
3. Enter Play Mode
4. Notice how the Root Motion indicator (trail of green dots) breaks when transitioning from one AnimationClipPlayable to another
5. Exit Play Mode
6. Change "PlayableTest.cs" script in Assets/Scripts with the one attached by the user "PlayerTestManual.cs"
7. Enter Play Mode again
Expected result: Root Motion is smooth when transitioning from one AnimationClipPlayable to another when updating PlayableGraph manually and also when using AnimationPlayableUtilities.Play()
Actual result: Root Motion is smooth only when the user manually updates PlayableGraph inside Update(), and it has abrupt offsets/shifts when using AnimationPlayableUtilities.Play() instead
Reproducible with: Animation Rigging 0.2.7-preview (2019.4.19f1), Animation Rigging 1.0.3 (2020.2.3f1, 2021.1.0b5, 2021.2.0a3)
Could not test with: 2018.4.31f1 (no Animation Rigging functionality)
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
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Tags window completely breaks and throws Exception errors when Adding a Tag to a GameObject
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
Resolution Note:
This is by design.
When using humanoid, a pivot management calculation is made, which is why an offset is added when the humanoid changes clip in the current case.
The reason the offset is not added when setting the time manually, is that the user didn't use the full playable graph functionality. He sets the time of the animationClips playable manually instead of calling PlayableGraph.Evaluate(float deltaTime). If he did use the latter way of updating the time manually, the offset would apply as well.
Some possible workarounds :
- don't use humanoids : humanoids does sensible things with sensible data. If some of those calculations are not wanted, it might be better to use Generics instead of humanoids
- Keep the workaround where the user updated the time of AnimationClipPlayables manually
- Synchronize the clips better, so that when changing from one clip to another, the offset is not as big