Skip to content

Commit

Permalink
Don't trigger animation events when paused 2 (#15682)
Browse files Browse the repository at this point in the history
# Objective

I completely forgot that animation events are triggered in two separate
systems (sorry). The issue ~~fixed~~ by #15677, can still happen if the
animation event is not targeting a specific bone.

## Solution

_Realy_ don't trigger animation events for paused animations.
  • Loading branch information
atornity authored Oct 6, 2024
1 parent f37f5fd commit b4ffb7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,10 @@ fn trigger_untargeted_animation_events(
};

for (index, active_animation) in player.active_animations.iter() {
if active_animation.paused {
continue;
}

let Some(clip) = graph
.get(*index)
.and_then(|node| match &node.node_type {
Expand Down

0 comments on commit b4ffb7a

Please sign in to comment.