bevy_rapier
bevy_rapier copied to clipboard
Updating a `Collider` through one of the `**_mut()` method doesn't work
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.
I have found the same issue and have tracked it down to (at least in my case) having a RapierPhysicsPlugin::physics_scale
of something other than 1.
. reproduction here https://github.com/MalachiMackie/bevy-rapier-resize-collider-physics-scale-repro
I'm running into this issue right now and I can't figure out a way around it.
Also of note, I haven't changed the physics scale of bevy and this still happens to me :/
@cole21771 check the PR linked in this thread (https://github.com/jakobhellermann/bevy-inspector-egui/pull/83) it works around the isssue