dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.91k stars 244 forks source link

Missing docs: sensors #117

Closed emilk closed 5 months ago

emilk commented 3 years ago

It seems like sensors doesn't contribute any mass to the bodies they are attached to. This tripped me up, as I don't see it mentioned anywhere in https://www.rapier.rs/docs/user_guides/rust/event_handling_and_sensors nor in https://docs.rs/rapier3d/0.5.0/rapier3d/geometry/struct.ColliderBuilder.html#method.sensor.

Ralith commented 3 years ago

The linked method's docs now include the line:

Sensors will have a default density of zero, but if you call Self::mass_properties you can assign a mass to a sensor.

Should this be closed?

sebcrozet commented 5 months ago

Sensors now contribute to the rigid-body mass too, for consistency with non-sensor colliders.