Class LimitLinear

Represents a joint limit between zero a single distance value.

Constructors

  • Parameters

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

    Returns LimitLinear

Properties

_contactDistance: number
_extent: 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 extent(): number
  • Distance at which the limit becomes active.

    Returns number

  • set extent(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 LimitLinear with identical values.

    Returns LimitLinear