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!
This commit is contained in:
parent
6882420c7f
commit
2e577bcdc9
4
crates/bevy_animation/src/lib.rs
Normal file → Executable file
4
crates/bevy_animation/src/lib.rs
Normal file → Executable file
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user