aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafal Harabien <rafal.harabien@allegro.com>2023-10-18 15:08:41 +0200
committerRafal Harabien <rafal.harabien@allegro.com>2023-10-18 15:08:41 +0200
commit94829fd8525fd19e3acaefac57b2f62e18b77dec (patch)
tree1345545969564450e9a38ee97ff1ba02d084c990 /src
parent82416e3ca66dcdc34c0f350cec570ef1019a199f (diff)
downloadrapier-94829fd8525fd19e3acaefac57b2f62e18b77dec.tar.gz
rapier-94829fd8525fd19e3acaefac57b2f62e18b77dec.tar.bz2
rapier-94829fd8525fd19e3acaefac57b2f62e18b77dec.zip
Fix enabling disabled collider
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
Diffstat (limited to 'src')
-rw-r--r--src/geometry/collider_components.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/geometry/collider_components.rs b/src/geometry/collider_components.rs
index 98ddbb7..fb08309 100644
--- a/src/geometry/collider_components.rs
+++ b/src/geometry/collider_components.rs
@@ -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,
)
}