Skip to content

Entity removals are sometimes missed when using a fixed schedule #599

Closed
@DiSaber

Description

@DiSaber

I've just started experiencing an issue where removed entities are still collidable and raycasts are still detecting them. My rapier plugin setup: RapierPhysicsPlugin::<NoUserData>::default().with_length_unit(1.0).in_schedule(FixedPostUpdate).
Attached is a video where I show the ramp in the main area and then enter a map (which removes all the main area's entities). As shown, the ramp is still collidable even though the entity has been removed. I just updated to the bevy 0.15 branch from the pr but I doubt that's the issue. It looks like this commit (src/plugin/plugin.rs line 219) removed the systems::sync_removals system from PostUpdate but as the comment states: "These must be in the main schedule currently so that they do not miss events." I think that line is likely the culprit and the simplest solution is to just add it back.

Youtube link (github won't let me upload video since it's >10mb): https://youtu.be/iyIRC7qQOSk

Workaround: Use with_default_system_setup(false) and configure the system sets manually, with systems::sync_removals in PostUpdate as before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions