mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
20264d0810
# Objective While scrolling through the animation crate, I was confused by the docs and code for the two methods. One does nothing for resetting an animation, the other just resets the weights for whatever reason. ## Solution Made the functions work accordingly to their documentation. `start` now replays the animation. And `play` doesn't reset the weight anymore. I have no clue why it should. `play` is there to don't do anything to an already existing animation. ## Testing I tested the current 0.14 code with bevy playground in the Animated Fox exampled and changed it such that on pressing space, either `play` or `start` would be called. Neither changed anything. I then inlined the function for start there and it restarted the animation, so it should work. --- ## Migration Guide `AnimationPlayer::start` now correspondingly to its docs restarts a running animation. `AnimationPlayer::play` doesn't reset the weight anymore. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |