Interface InstancedRigidBodiesProps

Hierarchy

Properties

additionalSolverIterations?: number

Sets 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.

angularDamping?: number

The angular damping coefficient of this rigid-body.

angularVelocity?: Vector3Tuple

The initial angular velocity of this body.

Default Value

[0,0,0]

args?: any

Arguments to pass to the collider

canSleep?: boolean

Whether or not this body can sleep.

Default Value

true

ccd?: boolean

Whether or not Continous Collision Detection is enabled for this rigid-body. https://rapier.rs/docs/user_guides/javascript/rigid_bodies#continuous-collision-detection

Default Value

false

children: ReactNode
colliderNodes?: ReactNode[]

Automatically generate colliders based on meshes inside this rigid body.

You can change the default setting globally by setting the colliders prop on the component.

Setting this to false will disable automatic colliders.

collisionGroups?: number

The default collision groups bitmask for all colliders in this rigid body. Can be customized per-collider.

density?: number

Sets 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

dominanceGroup?: number

The 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

enabledRotations?: Boolean3Tuple

Allow rotation of this rigid-body only along specific axes.

enabledTranslations?: Boolean3Tuple

Allow translation of this rigid-body only along specific axes.

friction?: number

Set the friction of auto-generated colliders. This does not affect any non-automatic child collider-components.

frictionCombineRule?: CoefficientCombineRule
gravityScale?: number

The scaling factor applied to the gravity affecting the rigid-body.

Default Value

1.0

includeInvisible?: boolean

Include invisible objects on the collider creation estimation.

linearDamping?: number

The linear damping coefficient of this rigid-body.

linearVelocity?: Vector3Tuple

The initial linear velocity of this body.

Default Value

[0,0,0]

lockRotations?: boolean

Locks all rotations that would have resulted from forces on the created rigid-body.

lockTranslations?: boolean

Locks all translations that would have resulted from forces on the created rigid-body.

mass?: number

The 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

massProperties?: {
    angularInertiaLocalFrame: Rotation;
    centerOfMass: Vector;
    mass: number;
    principalAngularInertia: Vector;
}

The mass properties of this rigid body. Cannot be used at the same time as the density or mass values.

Type declaration

  • angularInertiaLocalFrame: Rotation
  • centerOfMass: Vector
  • mass: number
  • principalAngularInertia: Vector
name?: string

The optional name passed to THREE's Object3D

onCollisionEnter?: CollisionEnterHandler

Callback when this collider collides with another collider.

onCollisionExit?: CollisionExitHandler

Callback when this collider stops colliding with another collider.

onContactForce?: ContactForceHandler

Callback when this, or another collider triggers a contact force event

onIntersectionEnter?: IntersectionEnterHandler

Callback when this collider, or another collider starts intersecting, and at least one of them is a sensor.

onIntersectionExit?: IntersectionExitHandler

Callback when this, or another collider stops intersecting, and at least one of them is a sensor.

position?: Vector3

Initial position of the RigidBody

principalAngularInertia?: Vector3Tuple

Principal angular inertia of this rigid body

quaternion?: Quaternion

The rotation, as a Quaternion, of this collider relative to the rigid body

restitution?: number

Set the restitution (bounciness) of auto-generated colliders. This does not affect any non-automatic child collider-components.

restitutionCombineRule?: CoefficientCombineRule
rotation?: Euler

Initial rotation of the RigidBody

scale?: Vector3

The scale of this collider relative to the rigid body

sensor?: boolean

Sets whether or not this collider is a sensor.

The shape of your collider

solverGroups?: number

The default solver groups bitmask for all colliders in this rigid body. Can be customized per-collider.

Specify the type of this rigid body

userData?: {
    [key: string]: any;
}

Passed down to the object3d representing this collider.

Type declaration

  • [key: string]: any

Methods

Generated using TypeDoc