Skip to content

Commit

Permalink
Make preserve loop make the animation switch at half the blend duration
Browse files Browse the repository at this point in the history
  • Loading branch information
acidbubbles committed Dec 30, 2020
1 parent de6ca63 commit a6ed729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AtomAnimations/AtomAnimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit a6ed729

Please sign in to comment.