I’ve been working on a game that leverages the animation rigging package and have noticed some undesirable behavior. I’d love to hear the dev team’s stance on this!
Repository with reproduction tests: GitHub - aylanonsense/unity-rigging-test
I have a game object with a circle, a square, and a triangle as its children. All the game object does is play three animations in sequence: one where the circle moves up, one where the square moves up, and one where the triangle moves up. Without using the animation rigging package, it looks like this:
https://drive.google.com/file/d/1w_61vXwV4cvcIpzaNBwWEIghjdhyFyq2/view
ISSUE #1
If we were to recreate these animations using constraints from the animation rigging package, it’d instead look like this:
https://drive.google.com/file/d/1QGSDZUiz2hLo_DiHXy0j78P3CTNie6j0/view
When using the animation rigging package, animations erroneously get stuck in their end positions.
ISSUE #2
Speeding up the square’s animation reveals another issue: it never actually fully reaches its end position:
https://drive.google.com/file/d/1wazgq-hB6aTbE2tlL2ZaUwu2spJKgsF_/view
When using the animation rigging package, animated properties never actually reach their end state. This can be difficult to notice unless the distance moved is large or the duration of the animation is small, but it appears to always be true.
ISSUE #3
Without the animation rigging package, adding a small blend between the animations looks like this:
https://drive.google.com/file/d/1Em6EN4yt3k7P6KwUNRJGkNAdPQdHUwka/view
With the animation rigging package, adding a small blend will result in the shapes trying–but failing–to reach their initial starting positions:
https://drive.google.com/file/d/108DcfVMU9uN2hrvF4T4Kab0gUP65-_Zw/view
CONCLUSION
Though I’ve separated these out into three separate issues, I imagine they’re all symptoms of the same architectural issue. What I imagine is happening is this:
- Every render cycle, the animation system updates all properties that are touched by active animation clips. It doesn’t bother updating anything else
- These render cycles can fall anywhere in the animation–there’s no guarantee that a render cycle will ever happen on the very last part of an animation (e.g. if an animation lasts 1.5 seconds, the last update for its animated properties might be at t=1.489)
Because of this, animated properties aren’t guaranteed to reach their end value. And animated properties won’t get reset to their default values when an animation clip ends, since at that point the animation system is no longer paying any attention to them.
I’ve really enjoyed working with the animation rigging package and want to continue leveraging it in my game. But I want to emphasize that what I’m seeing here is pretty undesirable behavior. It really compromises the animation rigging package’s value in my mind and has lead to many headaches.
I can imagine a scenario where all of this might be an unavoidable side effect of the architecture of the animation rigging package. If that’s so, that’s a shame. But if there is a way to, say, have the animation system pay attention to animated properties for an additional render cycle after an animation clip ends… that’d be lovely!
But to close this off, my main questions are:
- Is the dev team aware of this issue and is it possible to fix?
- Is anyone aware of any workarounds that guarantee animated properties will reach their end values?
Repository with reproduction tests: GitHub - aylanonsense/unity-rigging-test
Thanks!