API

Class Physics6DoFConstraint

A generic constraint, which can be used to build more complex constraints than those specified in PhysicsConstraintType. The axis and pivot options in PhysicsConstraintParameters define the space the constraint operates in. This constraint contains a set of limits, which restrict the relative movement of the bodies in that coordinate system

Hierarchy (View Summary)

Index
_pluginData: any = undefined

V2 Physics plugin private data for a physics material

The collection of limits which this constraint will apply

  • 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

  • Sets the maximum limit of the given axis for the physics engine.

    Parameters

    • axis: PhysicsConstraintAxis

      The axis to set the limit for.

    • limit: number

      The maximum limit of the axis.

      This method is useful for setting the maximum limit of the given axis for the physics engine, which can be used to control the movement of the physics object. This helps to ensure that the physics object does not move beyond the given limit.

    Returns void