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
This commit is contained in:
Rafal Harabien
2023-10-18 15:08:41 +02:00
parent 82416e3ca6
commit 94829fd852

View File

@@ -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,
)
}