Options
All
  • Public
  • Public/Protected
  • All
Menu

Creates a LockConstraint, which is a type of PhysicsConstraint.

param pivotA

The first pivot of the constraint in local space.

param pivotB

The second pivot of the constraint in local space.

param axisA

The first axis of the constraint in local space.

param axisB

The second axis of the constraint in local space.

param scene

The scene the constraint belongs to.

returns

The created LockConstraint.

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.

Hierarchy

Index

Constructors

Properties

_pluginData: any

V2 Physics plugin private data for a physics material

Accessors

  • get isCollisionsEnabled(): boolean
  • set isCollisionsEnabled(isEnabled: boolean): void
  • Gets whether collisions are enabled for this physics object.

    Returns boolean

    true if collisions are enabled, false otherwise.

  • Enables or disables collisions for the physics engine.

    Parameters

    • isEnabled: boolean

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

    Returns void

  • get isEnabled(): boolean
  • set isEnabled(isEnabled: boolean): void
  • Enable/disable the constraint

    Returns boolean

    true if constraint is enabled

  • Enable/disable the constraint

    Parameters

    • isEnabled: boolean

      value for the constraint

    Returns void

  • Retrieves the options of the physics constraint.

    Returns PhysicsConstraintParameters

    The physics constraint parameters.

  • Gets the type of the constraint.

    Returns PhysicsConstraintType

    The type of the constraint.

Methods

  • dispose(): void
  • Disposes the constraint from the physics engine.

    This method is useful for cleaning up the physics engine when a body is no longer needed. Disposing the body will free up resources and prevent memory leaks.

    Returns void

Legend

  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static method

Settings

Theme