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
							
								
									420f7f72dc
								
							
						
					
					
						commit
						e06f4d4083
					
				
							
								
								
									
										4
									
								
								crates/bevy_animation/src/lib.rs
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								crates/bevy_animation/src/lib.rs
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @ -875,12 +875,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
	 Al M.
						Al M.