API

Class SliderConstraint

Creates a SliderConstraint, which is a type of PhysicsConstraint.

This code is useful for creating a SliderConstraint, which is a type of PhysicsConstraint. It allows the user to specify the two pivots and two axes of the constraint in world space, as well as the scene the constraint belongs to. This is useful for creating a constraint between two rigid bodies that allows them to move along a certain axis.

The first pivot of the constraint, in world space.

The second pivot of the constraint, in world space.

The first axis of the constraint, in world space.

The second axis of the constraint, in world space.

The scene the constraint belongs to.

The created SliderConstraint.

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