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:
@@ -79,7 +79,7 @@ impl ColliderChanges {
|
|||||||
/// Do these changes justify a broad-phase update?
|
/// Do these changes justify a broad-phase update?
|
||||||
pub fn needs_broad_phase_update(self) -> bool {
|
pub fn needs_broad_phase_update(self) -> bool {
|
||||||
self.intersects(
|
self.intersects(
|
||||||
ColliderChanges::PARENT | ColliderChanges::POSITION | ColliderChanges::SHAPE,
|
ColliderChanges::PARENT | ColliderChanges::POSITION | ColliderChanges::SHAPE | ColliderChanges::ENABLED_OR_DISABLED,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user