Skip to content

Commit 071bfa7

Browse files
committed
fix colliders not removing their collisions when being disabled
1 parent bf498f3 commit 071bfa7

File tree

1 file changed

+3
-0
lines changed
  • src/collision/narrow_phase

1 file changed

+3
-0
lines changed

src/collision/narrow_phase/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ fn remove_collider(
441441
if let Ok(mut colliding_entities) = colliding_entities_query.get_mut(other_entity) {
442442
colliding_entities.remove(&entity);
443443
}
444+
if let Ok(mut colliding_entities) = colliding_entities_query.get_mut(entity) {
445+
colliding_entities.remove(&other_entity);
446+
}
444447

445448
let has_island = contact_edge.island.is_some();
446449

0 commit comments

Comments
 (0)