Class LimitCommon

Contains common values used by all Joint limit types.

Constructors

  • Parameters

    • OptionalcontactDistance: number
    • Optionalrestitution: number
    • Optionalspring: Immutable<Spring>

    Returns LimitCommon

Properties

_contactDistance: number
_restitution: number
_spring: Spring

Accessors

  • get contactDistance(): number
  • Distance from the limit at which it becomes active. Allows the solver to activate earlier than the limit is reached to avoid breaking the limit.

    Returns number

  • set contactDistance(value): void
  • Parameters

    • value: number

    Returns void

  • get restitution(): number
  • Controls how do objects react when the limit is reached, values closer to zero specify non-ellastic collision, while those closer to one specify more ellastic (i.e bouncy) collision. Must be in [0, 1] range.

    Returns number

  • set restitution(value): void
  • Parameters

    • value: number

    Returns void

  • get spring(): Spring
  • Spring that controls how are the bodies pulled back towards the limit when they breach it.

    Returns Spring

  • set spring(value): void
  • Parameters

    Returns void

Methods

  • Clones this instance and returns a new LimitCommon with identical values.

    Returns LimitCommon