When true the mass will be automatically calculated by the attached colliders
Rigidbodies with higher dominance will be immune to forces originating from contacts with rigidbodies of lower dominance.
Forward (0,0,-1) vector in world space
Gravity is such a common force that it is implemented as a special case (even if it could easily be implemented by the user using force application). Note however that a change of gravity won't automatically wake-up the sleeping bodies so keep in mind that you may want to wake them up manually before a gravity change.
It is possible to change the way gravity affects a specific rigid-body by setting the rigid-body's gravity scale to a value other than 1.0. The magnitude of the gravity applied to this body will be multiplied by this scaling factor. Therefore, a gravity scale set to 0.0 will disable gravity for the rigid-body whereas a gravity scale set to 2.0 will make it twice as strong. A negative value will flip the direction of the gravity for this rigid-body.
By default the mass will be automatically calculated (see autoMass
) by the physics engine using the collider sizes
To set the mass manually you can either set the mass
value or set autoMass
to false
Right (1,0,0) vector in world space
Returns the rigidbody velocity smoothed over ~ 10 frames
Up (0,1,0) vector in world space
Optional
earlyOptional
lateOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
resolveOptional
startOptional
updateWhen a dynamic rigid-body doesn't move (or moves very slowly) during a few seconds, it will be marked as sleeping by the physics pipeline. Rigid-bodies marked as sleeping are no longer simulated by the physics engine until they are woken up. That way the physics engine doesn't waste any computational resources simulating objects that don't actually move. They are woken up automatically whenever another non-sleeping rigid-body starts interacting with them (either with a joint, or with one of its attached colliders generating contacts).
Generated using TypeDoc
Link
https://rapier.rs/docs/user_guides/javascript/rigid_bodies#damping