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

Easings inserted during the same update that the previous easing ends get removed #23

Open
Trouv opened this issue Nov 5, 2022 · 0 comments

Comments

@Trouv
Copy link

Trouv commented Nov 5, 2022

I've had this mysterious bug in my game for a while Trouv/willos-graveyard#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-element EasingChainComponent. I think it would make querying for easings and adding to the chain later more understandable. I imagine this is controversial though.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant