Skip to content

An entity swapping contexts fails if running in FixedUpdate schedule #683

@AnthonyTornetta

Description

@AnthonyTornetta

Problem

When changing the RapierContextEntityLink component of an entity, I expect it to properly become a part of the new world it was added to. This works correctly if the PhysicsPlugin is being run in the Update schedule, but fails if it is being run in the FixedUpdate schedule.

Reproducible using this code:

https://github.com/AnthonyTornetta/bevy_rapier/blob/master/bevy_rapier3d/examples/change_contexts3.rs

You can test the success case by removing .in_fixed_schedule() on the plugin's initialization. In the failure: as soon as it changes worlds it is not successfully added to the new world, so it just disappears.

I will do some poking around and see if I can fix this.

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