Nate написалYes, start mixing from A -> B at A.duration - mixDuration
. If you were using AnimationState addAnimation
to queue the next animation, when you pass 0 for delay
it does exactly that.
This doesn't work for all situations.. .2s does not work at all for .5s animations, so if default mix is .2s you need to exit at the greater of Animation Duration - trackEntry.MixDuration vs. Animation Duration * .85% it seems.
03 Dec 2016, 14:45
//set the desired exit time to the animation duration minus mix duration of the track
//if the exit "duration" is less than the mix time, instead set the exit time to 85% into the animation
desiredExitTime = trackEntry.Animation.Duration - trackEntry.MixDuration;
//the calculated time that this anim will exit with the desired exit time
float exitDuration = trackEntry.Animation.Duration - desiredExitTime;
//if the exit duration is less than the mix, change the exit time to something more reasonable
if (exitDuration < trackEntry.MixDuration)
{
desiredExitTime = trackEntry.Animation.Duration * exitTime;
}
03 Dec 2016, 14:46
Am I not using SetAnimation correctly where I should be using Add? We don't use Add anywhere in our game.