bevy_easings
bevy_easings copied to clipboard
Easings inserted during the same update that the previous easing ends get removed
I've had this mysterious bug in my game for a while https://github.com/Trouv/willos-graveyard/issues/7
Basically, if the beginning of one of my movement animations happens during the same update as the ending of the previous movement animation, the new animation doesn't happen. I'm starting the new animation by inserting a new easing component, rather than using a chain (a chain doesn't quite fit this situation). Looking into the source code, it makes sense why. I managed to resolve the issue on my end by moving my systems responsible for inserting easings out of CoreStage::Update
. I think using easing chains may have helped resolve this as well, but I had a hard time understanding how to turn an easing into an easing chain after the easing had already been inserted.
I can think of a few changes that may help alleviate this:
- Move the default easing systems out of
CoreStage::Update
- Give the default easing systems a system label (users could then avoid this by adding their systems
.after(EasingLabel)
) - Make all easings easing chains. Instead of
EasingComponent
, you would just have a single-elementEasingChainComponent
. I think it would make querying for easings and adding to the chain later more understandable. I imagine this is controversial though.