From 2e577bcdc9c09f18f4d06fe5f580e7ce26ff37dc Mon Sep 17 00:00:00 2001 From: "Al M." Date: Mon, 22 Jul 2024 11:44:27 -0700 Subject: [PATCH] Fix single keyframe animations. (#14344) # Objective For clips with more than one curve, only the first was being applied if there is only one keyframe in it. ## Solution Continue! --- crates/bevy_animation/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 crates/bevy_animation/src/lib.rs diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs old mode 100644 new mode 100755 index 0023532a18..21527d071f --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -874,12 +874,12 @@ impl AnimationTargetContext<'_> { // Some curves have only one keyframe used to set a transform if curve.keyframe_timestamps.len() == 1 { self.apply_single_keyframe(curve, weight); - return; + continue; } // Find the current keyframe let Some(step_start) = curve.find_current_keyframe(seek_time) else { - return; + continue; }; let timestamp_start = curve.keyframe_timestamps[step_start];