I would like to play an animation with mixing, but have all frames of the animation fully applied instead of the start and end only partially applied due to the mixing. For example: mixing from A to the starting frame of B, play all of B, then mix to C from the last frame of B.
Is there some built in way of doing this that I have missed? Or at least what might be considered the "proper" way to solve this?
Thanks for any help or info! :grinteeth:
Here is what I have discovered and tried so far. Please correct me if I am wrong about any of this!
I am using the Unity runtime, but this should be relevant to any of them.
If you subtract TrackTime by the MixDuration, it seems to correctly apply mixing toward the first frame of animation, and once the mix is over it starts the animation as normal.
Mixing out is harder, because that duration is determined by the next animation. If you just add MixDuration to AnimationEnd, it will play the full animation before mixing out, but if mixing with anything outside of the default mix duration it will be incorrect (e.g. if C was a 0 mix duration, B will hold at the last frame for default mix duration). Maybe I can use trackEntry.Next to find the upcoming mix duration? Also, I think HoldPrevious is required here when using higher tracks so there is no snapping to setup/lower pose briefly when mixing out after the animation has ended.
I also tried setting TimeScale to 0, waiting for the MixDuration, and then setting it back to 1. Since mixing is applied without respect to TimeScale, this could sort of work for mixing in. If you needed to actually modify TimeScale though for any other reason, this would break.
This doesn't help with waiting for the last frame to mix out.