A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.

Hierarchy (View Summary)

Constructors

Methods

  • Enable/disable the joint limit.

    Parameters

    • flag: boolean

      True to enable, false to disable.

    Returns void

  • Enable/disable the joint motor.

    Parameters

    • flag: boolean

      True to enable, false to disable.

    Returns void

  • Get the current joint translation speed, usually in meters per second.

    Returns number

    Joint speed.

  • Get the current joint translation, usually in meters.

    Returns number

    Joint translation.

  • Get the lower joint limit, usually in meters.

    Returns number

    Lower limit.

  • Get the current motor force, usually in N.

    Returns number

    Motor force.

  • Get the motor speed, usually in meters per second.

    Returns number

    Motor speed.

  • Get the upper joint limit, usually in meters.

    Returns number

    Upper limit.

  • Is the joint limit enabled?

    Returns boolean

    True if enabled otherwise false.

  • Is the joint motor enabled?

    Returns boolean

    True if enabled, otherwise false.

  • Set the joint limits, usually in meters.

    Parameters

    • lower: number

      Lower limit.

    • upper: number

      Upper limit.

    Returns void

  • Set the maximum motor force, usually in N.

    Parameters

    • force: number

      New max force.

    Returns void

  • Set the motor speed, usually in meters per second.

    Parameters

    • speed: number

      New motor speed.

    Returns void