AnimationChain skips one frame between each step due to deferred command flush #25
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
File
solitaire_engine/src/card_animation/chain.rslines 98–113Description
advance_animation_chainsusesWithout<CardAnimation>to detect when the current step has finished.advance_card_animationsends a step viacommands.entity(entity).remove::<CardAnimation>(). Bevy deferred commands are not flushed until the nextApplyDeferredpoint. In the same frame a step completes,CardAnimationis still visible to the query —advance_animation_chainsdoes not pop the next entry, producing a consistent 1-frame gap between every pair of chain steps. For fast chains this is a visible stutter; for long sequences the timing error accumulates.Fix
Either schedule an explicit
ApplyDeferredbetweenadvance_card_animationsandadvance_animation_chains, or haveadvance_card_animationssignal step completion via anEventrather than relying on component removal visibility.