Skip to content

Commit fce341e

Browse files
committed
Add is_sensor
1 parent f1f8e96 commit fce341e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/collision/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,11 @@ impl Contacts {
632632
self.total_normal_impulse_magnitude() / delta_time
633633
}
634634

635+
/// Returns `true` if at least one of the colliders is a [`Sensor`].
636+
pub fn is_sensor(&self) -> bool {
637+
self.flags.contains(ContactPairFlags::SENSOR)
638+
}
639+
635640
/// Returns `true` if the colliders are touching, including sensors.
636641
pub fn is_touching(&self) -> bool {
637642
self.flags.contains(ContactPairFlags::TOUCHING)

0 commit comments

Comments
 (0)