API

Class SpringConstraint

Creates a SpringConstraint, which is a type of Physics6DoFConstraint. This constraint applies a force at the ends which is proportional to the distance between ends, and a stiffness and damping factor. The force is calculated as (stiffness * positionError) - (damping * velocity)

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 minimum distance between the two pivots.

The maximum distance between the two pivots.

The stiffness of the spring.

The damping of the spring.

The scene the constraint belongs to.

The created SpringConstraint.

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