Moscrif API Docs for: 2012q3
Show:

b2RevoluteJoint Class

Library: box2d

A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.

Methods

getLimits

() Multivalue

Another way to get lower and upper limit.

Returns:

Multivalue: Pair of float values: lower and upper limit.

setLimits

(
  • lower
  • upper
)

Another way to set lower and upper limit.

Parameters:

  • lower Float

    The lower joint limit, usually in meters.

  • upper Float

    The upper joint limit, usually in meters.

Properties

enableLimit

Boolean

Enable / disable joint limits.

enableMotor

Boolean

Enable / disable the joint motor.

lowerLimit

Float

The lower angle for the joint limit (radians).

motorSpeed

Float

The desired motor speed (usually in radians per second)

motorTorque

Float

The maximum motor torque, usually in N-m.

upperLimit

Float

The upper angle for the joint limit (radians).