Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix animations resetting after repeat count #10540

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

nicopap
Copy link
Contributor

@nicopap nicopap commented Nov 13, 2023

Objective

After #9002, it seems that "single shot" animations were broken. When completing, they would reset to their initial value. Which is generally not what you want.

Solution

Avoid %-ing the animation after the number of completions exceeds the specified one. Instead, we early-return. This is also true when the player is playing in reverse.


Changelog

  • Avoid resetting animations after Repeat::Never animation completion.

@nicopap nicopap added this to the 0.12.1 milestone Nov 13, 2023
@nicopap nicopap added C-Bug An unexpected or incorrect behavior A-Animation Make things move and change over time P-Regression Functionality that used to work but no longer does. Add a test for this! labels Nov 13, 2023
@cart cart added this pull request to the merge queue Nov 14, 2023
Merged via the queue into bevyengine:main with commit c730d8c Nov 14, 2023
25 checks passed
cart pushed a commit that referenced this pull request Nov 30, 2023
# Objective

After #9002, it seems that "single shot" animations were broken. When
completing, they would reset to their initial value. Which is generally
not what you want.

- Fixes #10480

## Solution

Avoid `%`-ing the animation after the number of completions exceeds the
specified one. Instead, we early-return. This is also true when the
player is playing in reverse.

---

## Changelog

- Avoid resetting animations after `Repeat::Never` animation completion.
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

After bevyengine#9002, it seems that "single shot" animations were broken. When
completing, they would reset to their initial value. Which is generally
not what you want.

- Fixes bevyengine#10480

## Solution

Avoid `%`-ing the animation after the number of completions exceeds the
specified one. Instead, we early-return. This is also true when the
player is playing in reverse.

---

## Changelog

- Avoid resetting animations after `Repeat::Never` animation completion.
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 P-Regression Functionality that used to work but no longer does. Add a test for this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Animation player jumps to the first frame after animation ends, instead of staying at the last frame
3 participants