Skip to main content

Module physics

Module physics 

Source
Expand description

Predictable arcade physics with continuous translation and no rotation.

Worlds are game-owned and stepped explicitly from the fixed update. The legacy crate::collision::Body2D and crate::collision::Body3D remain independent. See crate::physics::guide for setup and solver limits.

Modules§

guide
Checked usage guide, also available without the rendering SDK.

Structs§

BodyId
Stable, never-reused world collider identity.
CollisionFilter
Symmetric collision filtering, shared by bodies, static solids and triggers.
Penetration2D
Minimum translation needed to remove a positive overlap.
Penetration3D
Minimum translation needed to remove a positive overlap.
PhysicsBody2D
World collider, including solids and nonblocking trigger volumes.
PhysicsBody3D
World collider, including solids and nonblocking trigger volumes.
PhysicsWorld2D
Small deterministic arcade world. Own it in game state and call step(ctx.tick, &mut events) exactly once per fixed update.
PhysicsWorld3D
Small deterministic arcade world. Own it in game state and call step(ctx.tick, &mut events) exactly once per fixed update.
StepReport
Bounded solver work and any unconsumed simulation time.
TriggerEvent
Typed trigger event. Queues append until the game clears or drains them.
UniformGrid2D
Reusable uniform-grid broadphase with stable, sorted query results. Touching bounds are candidates; callers perform their own narrowphase.
UniformGrid3D
Reusable uniform-grid broadphase with stable, sorted query results. Touching bounds are candidates; callers perform their own narrowphase.

Enums§

BodyKind
Motion authority. Only dynamic bodies receive forces and collision response.
Shape2D
Local centered collision geometry, with no rotation.
Shape3D
Local centered collision geometry, with no rotation.
TriggerPhase
Trigger transition at a fixed tick boundary. A swept pass emits enter/exit.