Skip to main content

Module physics

Module physics 

Source
Expand description

Rapier integration. ECS components are the source of truth: bodies, colliders and joints are created from them (also for entities spawned later), and dynamic results are written back.

Structures: a collider without its own RigidBody attaches to the nearest ancestor that has one, so a hierarchy of colliders under one body moves as a single compound body.

Structsยง

Physics
Host-owned Rapier state mirrored from ECS components during Self::step. Queries reflect the most recently completed physics step, not pending ECS edits. Use Self::reset to explicitly rebuild after wholesale scene replacement.
QueryOptions
Filtering policy for world-space physics queries. Layer masks use the same symmetric rule as collider/collider interactions.
RayHit
Closest solid-collider hit. Distances are metres along a normalized ray.