To address the issue of unwanted mixing when setting a new animation before the previous mix has finished, you can use the SetAnimation
method with a mix duration of 0 to immediately switch to the new animation without blending. However, if you are experiencing a blend for one frame, it might be due to the way the animation state is being managed. You can try clearing the tracks before setting the new animation to ensure no previous mixes affect the new animation. This can be done using ClearTracks()
or ClearTrack(trackIndex)
to remove any ongoing mixes. Additionally, ensure that the bones you want visible are keyed correctly in the new animation to avoid them being hidden due to previous animation states.