bevy/crates/bevy_animation/src
Hannes Karppila 93def2611b
Fix repeated animation transition bug (#14411)
# Objective

Fixes #13910

When a transition is over, the animation is stopped. There was a race
condition; if an animation was started while it also had an active
transition, the transition ending would then incorrectly stop the newly
added animation.

## Solution

When starting an animation, cancel any previous transition for the same
animation.

## Testing

The changes were tested manually, mainly by using the `animated_fox`
example. I also tested with changes from
https://github.com/bevyengine/bevy/pull/13909.

I'd like to have an unit test for this as well, but it seems quite
complex to do, as I'm not sure how I would detect an incorrectly paused
animation.

Reviewers can follow the instructions in #13910 to reproduce.

Tested on macos 14.4 (M3 processor) Should be platform-independent,
though.
2024-07-22 19:17:46 +00:00
..
animatable.rs Remove ClampColor (#13307) 2024-05-10 13:15:56 +00:00
graph.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
lib.rs Fix single keyframe animations. (#14344) 2024-07-22 18:44:27 +00:00
transition.rs Fix repeated animation transition bug (#14411) 2024-07-22 19:17:46 +00:00
util.rs Animatable trait for interpolation and blending (#4482) 2024-02-02 21:19:37 +00:00