Skip to content

Conversation

@atornity
Copy link
Contributor

@atornity atornity commented Oct 6, 2024

Objective

Pausing the animated_fox example perfectly as one of the feet hits the ground causes the event to be triggered every frame.

Context: #15538

Solution

Don't trigger animation events if the animation is paused.

Testing

Ran the example, I no longer see the issue.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be clearer with an && !paused style, but I won't block on that.

@alice-i-cecile alice-i-cecile added this to the 0.15 milestone Oct 6, 2024
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Animation Make things move and change over time S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 6, 2024
@atornity
Copy link
Contributor Author

atornity commented Oct 6, 2024

I think this would be clearer with an && !paused style, but I won't block on that.

That's unstable for if let expressions. I could nest the if let inside a if !paused if that's preferable.

@alice-i-cecile
Copy link
Member

Curse you unstable Rust features. Mild preference for nesting.

@mweatherley mweatherley added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 6, 2024
@mockersf mockersf added this pull request to the merge queue Oct 6, 2024
Merged via the queue into bevyengine:main with commit 70269ef Oct 6, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 6, 2024
# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Animation Make things move and change over time C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants