Class HingeJointDrive

Properties of a drive that drives the joint's angular velocity towards a paricular value.

Constructors

  • Parameters

    • Optionalspeed: number
    • OptionalforceLimit: number
    • OptionalgearRatio: number
    • OptionalisFreeSpinEnabled: boolean

    Returns HingeJointDrive

Properties

_forceLimit: number
_gearRatio: number
_isFreeSpinEnabled: boolean
_speed: number

Accessors

  • get forceLimit(): number
  • Maximum torque the drive is allowed to apply .

    Returns number

  • set forceLimit(value): void
  • Parameters

    • value: number

    Returns void

  • get gearRatio(): number
  • Scales the velocity of the first body, and its response to drive torque is scaled down.

    Returns number

  • set gearRatio(value): void
  • Parameters

    • value: number

    Returns void

  • get isFreeSpinEnabled(): boolean
  • If the joint is moving faster than the drive's target speed, the drive will try to break. If you don't want the breaking to happen set this to true.

    Returns boolean

  • set isFreeSpinEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get speed(): number
  • Target speed of the joint.

    Returns number

  • set speed(value): void
  • Parameters

    • value: number

    Returns void

Methods