pub type BodyStatus = RigidBodyType;Expand description
The type of a body, governing the way it is affected by external forces.
Aliased Type§
pub enum BodyStatus {
Dynamic = 0,
Fixed = 1,
KinematicPositionBased = 2,
KinematicVelocityBased = 3,
}Variants§
Dynamic = 0
Fully simulated - responds to forces, gravity, and collisions.
Use for: Falling objects, projectiles, physics-based characters, anything that should behave realistically under physics simulation.
Fixed = 1
Never moves - has infinite mass and is unaffected by anything.
Use for: Static level geometry, walls, floors, terrain, buildings.
KinematicPositionBased = 2
Controlled by setting next position - pushes but isn’t pushed.
You control this by setting where it should be next frame. Rapier computes the velocity needed to get there. The body can push dynamic bodies but nothing can push it back (one-way interaction).
Use for: Animated platforms, objects controlled by external animation systems.
KinematicVelocityBased = 3
Controlled by setting velocity - pushes but isn’t pushed.
You control this by setting its velocity directly. It moves predictably regardless of what it hits. Can push dynamic bodies but nothing can push it back (one-way interaction).
Use for: Moving platforms, elevators, doors, player-controlled characters (when you want direct control rather than physics-based movement).