Physicsdata

PhysicsData interface

This interface describes the data schema used to attach collision data to a component.

See Component3DData.collider

Signature:

export interface PhysicsData 

Properties

Property

Modifiers

Type

Description

colliderType?

ColliderType

(Optional) The type of collider to attach to the component

dynamicProps?

DynamicProps

(Optional) Properties for dynamic rigid bodies

enabled?

boolean

(Optional) If this is false, no collider will be attached to the component

enabledRotation?

[boolean, boolean, boolean]

(Optional)

enabledTranslation?

[boolean, boolean, boolean]

(Optional)

groups?

number

(Optional)

rigidbodyType?

RigidBodyType

(Optional) The type of rigidbody to attach to the component

rotationLock?

[boolean, boolean, boolean]

(Optional) Locks the rotation of the rigid body along the x, y, and z axes

sensor?

boolean

(Optional) If this is true, the collider will be a sensor

See Rapier Documentation (opens in a new tab) for more info

translationLock?

[boolean, boolean, boolean]

(Optional) Locks the translation of the rigid body along the x, y, and z axes