From a6ed729b996365a37efb39c381e407b0c5984051 Mon Sep 17 00:00:00 2001 From: Acid Bubbles Date: Tue, 29 Dec 2020 22:11:12 -0500 Subject: [PATCH] Make preserve loop make the animation switch at half the blend duration --- src/AtomAnimations/AtomAnimation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AtomAnimations/AtomAnimation.cs b/src/AtomAnimations/AtomAnimation.cs index 1dfe84e2..6ab58c3a 100644 --- a/src/AtomAnimations/AtomAnimation.cs +++ b/src/AtomAnimations/AtomAnimation.cs @@ -515,7 +515,7 @@ private void AssignNextAnimation(AtomAnimationClip source) var nextTime = source.nextAnimationTime; if (source.preserveLoops && source.loop) { - nextTime = nextTime.RoundToNearest(source.animationLength) - next.blendInDuration + source.clipTime; + nextTime = nextTime.RoundToNearest(source.animationLength) - (next.blendInDuration / 2f) + source.clipTime; } if (source.nextAnimationTimeRandomize > 0f) {