From b72849eafed8003073299ad14e2c60dd22a5cec3 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 6 Nov 2023 19:52:19 -0600 Subject: [PATCH] Fix anim slot from playing animations more than 1 time based on speed. --- Source/Engine/Animations/Graph/AnimGroup.Animation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp index 0518fe248..5cceb31e3 100644 --- a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp +++ b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp @@ -2109,7 +2109,8 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu bucket.LoopsLeft--; bucket.LoopsDone++; } - value = SampleAnimation(node, loop, length, 0.0f, bucket.TimePosition, newTimePos, anim, slot.Speed); + // Speed is accounted for in the new time pos, so keep sample speed at 1 + value = SampleAnimation(node, loop, length, 0.0f, bucket.TimePosition, newTimePos, anim, 1); bucket.TimePosition = newTimePos; if (bucket.LoopsLeft == 0 && slot.BlendOutTime > 0.0f && length - slot.BlendOutTime < bucket.TimePosition) {