Optional
activeOptional
additionalSets the number of additional solver iterations that will be run for this rigid-body and everything that interacts with it directly or indirectly through contacts or joints.
Compared to increasing the global World.numSolverIteration
, setting this
value lets you increase accuracy on only a subset of the scene, resulting in reduced
performance loss.
Optional
angularThe angular damping coefficient of this rigid-body.
Optional
angularThe initial angular velocity of this body.
[0,0,0]
Optional
argsArguments to pass to the collider
Optional
canWhether or not this body can sleep.
true
Optional
ccdWhether or not Continous Collision Detection is enabled for this rigid-body. https://rapier.rs/docs/user_guides/javascript/rigid_bodies#continuous-collision-detection
false
Optional
colliderOptional
collidersAutomatically generate colliders based on meshes inside this rigid body.
You can change the default setting globally by setting the colliders
prop on the
Setting this to false will disable automatic colliders.
Optional
collisionThe default collision groups bitmask for all colliders in this rigid body. Can be customized per-collider.
Optional
contactThe contact skin of the collider.
The contact skin acts as if the collider was enlarged with a skin of width contactSkin around it, keeping objects further apart when colliding.
A non-zero contact skin can increase performance, and in some cases, stability. However it creates a small gap between colliding object (equal to the sum of their skin). If the skin is sufficiently small, this might not be visually significant or can be hidden by the rendering assets.
0
Optional
densitySets the uniform density of this collider. If this is set, other mass-properties like the angular inertia tensor are computed automatically from the collider's shape. Cannot be used at the same time as the mass or massProperties values. More info https://rapier.rs/docs/user_guides/javascript/colliders#mass-properties
Optional
dominanceThe dominance group of this RigidBody. If a rigid body has a higher domiance group, on collision it will be immune to forces originating from the other bodies. https://rapier.rs/docs/user_guides/javascript/rigid_bodies#dominance Default: 0
Optional
enabledAllow rotation of this rigid-body only along specific axes.
Optional
enabledAllow translation of this rigid-body only along specific axes.
Optional
frictionSet the friction of auto-generated colliders. This does not affect any non-automatic child collider-components.
Optional
frictionWhat happens when two bodies meet. See https://rapier.rs/docs/user_guides/javascript/colliders#friction.
Optional
gravityThe scaling factor applied to the gravity affecting the rigid-body.
1.0
Optional
includeInclude invisible objects on the collider creation estimation.
Optional
linearThe linear damping coefficient of this rigid-body.
Optional
linearThe initial linear velocity of this body.
[0,0,0]
Optional
lockLocks all rotations that would have resulted from forces on the created rigid-body.
Optional
lockLocks all translations that would have resulted from forces on the created rigid-body.
Optional
massThe mass of this collider. Generally, it's not recommended to adjust the mass properties as it could lead to unexpected behaviors. Cannot be used at the same time as the density or massProperties values. More info https://rapier.rs/docs/user_guides/javascript/colliders#mass-properties
Optional
massThe mass properties of this rigid body. Cannot be used at the same time as the density or mass values.
Optional
nameThe optional name passed to THREE's Object3D
Optional
onCallback when this collider collideas with another collider.
Optional
onCallback when this collider stops colliding with another collider.
Optional
onCallback when this, or another collider triggers a contact force event
Optional
onCallback when this collider, or another collider starts intersecting, and at least one of them is a sensor
.
Optional
onCallback when this, or another collider stops intersecting, and at least one of them is a sensor
.
Optional
positionInitial position of the RigidBody
Optional
principalPrincipal angular inertia of this rigid body
Optional
quaternionThe rotation, as a Quaternion, of this collider relative to the rigid body
Optional
restitutionSet the restitution (bounciness) of auto-generated colliders. This does not affect any non-automatic child collider-components.
Optional
restitutionWhat happens when two bodies meet. See https://rapier.rs/docs/user_guides/javascript/colliders#friction.
Optional
rotationInitial rotation of the RigidBody
Optional
scaleThe scale of this collider relative to the rigid body
Optional
sensorSets whether or not this collider is a sensor.
Optional
shapeThe shape of your collider
Optional
softThe maximum prediction distance Soft Continuous Collision-Detection.
When set to 0, soft-CCD is disabled.
Soft-CCD helps prevent tunneling especially of slow-but-thin to moderately fast objects. The soft CCD prediction distance indicates how far in the object’s path the CCD algorithm is allowed to inspect. Large values can impact performance badly by increasing the work needed from the broad-phase.
It is a generally cheaper variant of regular CCD since it relies on predictive constraints instead of shape-cast and substeps.
0
Optional
solverThe default solver groups bitmask for all colliders in this rigid body. Can be customized per-collider.
Optional
typeSpecify the type of this rigid body
Optional
userPassed down to the object3d representing this collider.
Optional
onOptional
onGenerated using TypeDoc
The default active collision types for all colliders in this rigid body. Can be customized per-collider.
Use
ActiveCollisionTypes
to specify which collision types should be active for this collider.See