Skip to content

Commit

Permalink
Fix enabling disabled collider
Browse files Browse the repository at this point in the history
If collider was enabled and no other attributes were changed its collisions
were not detected. This was the result of `needs_broad_phase_update` function
not handling case of changed enabled status.
Fixes dimforge/bevy_rapier#435
  • Loading branch information
rafalh committed Oct 18, 2023
1 parent 82416e3 commit 94829fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geometry/collider_components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl ColliderChanges {
/// Do these changes justify a broad-phase update?
pub fn needs_broad_phase_update(self) -> bool {
self.intersects(
ColliderChanges::PARENT | ColliderChanges::POSITION | ColliderChanges::SHAPE,
ColliderChanges::PARENT | ColliderChanges::POSITION | ColliderChanges::SHAPE | ColliderChanges::ENABLED_OR_DISABLED,
)
}

Expand Down

0 comments on commit 94829fd

Please sign in to comment.