dimforge / dimforge/bevy_rapier

An entity swapping contexts fails if running in FixedUpdate schedule

Open
#683 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.6k
Forks
282
PR merge metrics
No merged PRs in 30d

Description

## 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.