Interface ColliderProps

Hierarchy

Properties

args?: any

Arguments to pass to the collider

children?: ReactNode
collisionGroups?: number

The bit mask configuring the groups and mask for collision handling.

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

friction?: number

Friction is a force that opposes the relative tangential motion between two rigid-bodies with colliders in contact. A friction coefficient of 0 implies no friction at all (completely sliding contact) and a coefficient greater or equal to 1 implies a very strong friction. Values greater than 1 are allowed.

frictionCombineRule?: CoefficientCombineRule
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

The position of this collider relative to the rigid body

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

Restitution controls how elastic (aka. bouncy) a contact is. Le elasticity of a contact is controlled by the restitution coefficient

restitutionCombineRule?: CoefficientCombineRule
rotation?: Euler

The rotation of this collider relative to the rigid body

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 bit mask configuring the groups and mask for solver handling.

Generated using TypeDoc