dimforge / dimforge/bevy_rapier

Updating a `Collider` through one of the `**_mut()` method doesn't work

Open
#247 3 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

When I update a `Collider` component, using one of the `**_mut()` methods such as `as_cone_mut()`, I find that the collider is never updated. Instead, I have to clone the `SharedShape` of the `Collider` using the `Shape::clone_box` method and replace the `raw` field of `Collider`.

It probably happens because somewhere, update is dependent on `Arc` pointer comparison instead of structural comparison. A good way of working around that is to make the `set` methods of the various `**ViewMut` set a "update" field in `Collider`, and use that field in addition to the pointer comparison for update detection.

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.