API

Class LockConstraint

Creates a LockConstraint, which is a type of PhysicsConstraint.

This code is useful for creating a LockConstraint, which is a type of PhysicsConstraint. It takes in two pivots and two axes in local space, as well as the scene the constraint belongs to, and creates a LockConstraint.

The first pivot of the constraint in local space.

The second pivot of the constraint in local space.

The first axis of the constraint in local space.

The second axis of the constraint in local space.

The scene the constraint belongs to.

The created LockConstraint.

Hierarchy (View Summary)

Index
_pluginData: any = undefined

V2 Physics plugin private data for a physics material

  • get isCollisionsEnabled(): boolean

    Gets whether collisions are enabled for this physics object.

    Returns boolean

    true if collisions are enabled, false otherwise.

  • set isCollisionsEnabled(isEnabled: boolean): void

    Enables or disables collisions for the physics engine.

    Parameters

    • isEnabled: boolean

      A boolean value indicating whether collisions should be enabled or disabled.

    Returns void