Skip to content

make TweenAnim removal in step_impl infallible - #160

Closed
adsick wants to merge 1 commit into
djeedai:mainfrom
adsick:infallible-tween-anim-remove
Closed

make TweenAnim removal in step_impl infallible#160
adsick wants to merge 1 commit into
djeedai:mainfrom
adsick:infallible-tween-anim-remove

Conversation

@adsick

@adsick adsick commented Nov 22, 2025

Copy link
Copy Markdown

The motivation is that in our project we use this construct

.spawn(...)
.observe(|trigger: On<AnimCompletedEvent>, mut commands: Commands| {
    commands.entity(trigger.event().event_target()).try_despawn();
});

to despawn entities when animation completes, but current implementation in bevy_tweening expects that entity exists. I'm a little puzzled by the fact that our observer runs before your component cleanup, but this PR fixes it anyway.

@extrawurst

Copy link
Copy Markdown
Contributor

Thanks for finding the cause of these panics, however your fix was not sufficient in my case. see #167

@djeedai

djeedai commented Jan 24, 2026

Copy link
Copy Markdown
Owner

This should be fixed by #167, closing this.

@djeedai djeedai closed this Jan 24, 2026
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

Successfully merging this pull request may close these issues.

3 participants