We’re using the animator track without a base animation, where we just want to play an animation during a cutscene (to open a book specifically) and then leave the model on the end frame of that animation (i.e. blend out is zero).
But we found that the book would snap back to the default pose after the animation played. Although bizarrely this would apparently only happen when the time scale was increased.
Looking at DisableClip() in AnimatorTrack.cs I saw that the animation weight was being set to 0 and the base animation (none in our case) weight set to 1. To get around this problem I’ve changed this code to match EnableClip code which means the weight is based playAnimClip.GetClipWeight();
It’s nothing wrong on your part. It’s just that clamping animator clips is not yet implemented, so even if BlendOut is 0, the model animation will fallback to base animation clip and in case there is no base animation clip, then (by default) it fallbacks to the models “rest” pose.
Your change is one step towards doing this, but it will create some (very minor) issues in cases where two clips are crossblended and only when root motion is enabled.
It will need some more changes so handle these minor issues, but until I implement clamping correctly (next version), your changes are fine to keep, yes. 🙂
You might also want to change the 2nd line of code to this: