RSX Code Reference
    Preparing search index...

    Class Spring

    Controls spring parameters for a physics joint limits. If a limit is soft (body bounces back due to restition when the limit is reached) the spring will pull the body back towards the limit using the specified parameters.

    Index
    • Parameters

      • Optionalstiffness: number
      • Optionaldamping: number

      Returns Spring

    _damping: number
    _stiffness: number
    • get damping(): number

      Damping strength. Force propertional to the velocity error.

      Returns number

    • set damping(value: number): void

      Parameters

      • value: number

      Returns void

    • get stiffness(): number

      Spring strength. Force proportional to the position error.

      Returns number

    • set stiffness(value: number): void

      Parameters

      • value: number

      Returns void

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

      Returns Spring