Fix shape modification not updating graphics in testbed (#708)
* Fix shape modification not updating graphics in testbed * Add update collider to Testbed * chore: lint shape_modifications3 * chore: simplify GraphicsManager::remove_collider_nodes --------- Co-authored-by: Sébastien Crozet <sebcrozet@dimforge.com>
This commit is contained in:
committed by
GitHub
parent
2ed1934756
commit
552cfebab0
@@ -83,13 +83,16 @@ impl GraphicsManager {
|
||||
) {
|
||||
let body = body.unwrap_or(RigidBodyHandle::invalid());
|
||||
if let Some(sns) = self.b2sn.get_mut(&body) {
|
||||
for sn in sns.iter_mut() {
|
||||
sns.retain(|sn| {
|
||||
if let Some(sn_c) = sn.collider {
|
||||
if sn_c == collider {
|
||||
commands.entity(sn.entity).despawn();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user