Interface ColliderOptions<ColliderArgs>

Type Parameters

  • ColliderArgs extends unknown[]

Hierarchy

Properties

activeCollisionTypes?: ActiveCollisionTypes

The collision types active for this collider.

Use ActiveCollisionTypes to specify which collision types should be active for this collider.

See

args?: ColliderArgs

Arguments to pass to the collider

collisionGroups?: number

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

contactSkin?: number

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

Default Value

0

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 collideas 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