SYNOPSIS

DESCRIPTION

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

EnableLimit( $flag )

Enable/disable the joint limit.

Parameters:

bool$flag

EnableMotor( $flag )

Enable/disable the joint motor.

Parameters:

bool$flag

GetAnchorA()

Get the anchor point on bodyA in world coordinates. Implements Box2D::b2Joint.

Returns a Box2D::b2Vec2

GetAnchorB()

Get the anchor point on bodyB in world coordinates. Implements Box2D::b2Joint.

Returns a Box2D::b2Vec2

GetJointAngle()

Get the current joint angle in radians.

Returns a float32

GetJointSpeed()

Get the current joint angle speed in radians per second.

Returns a float32

GetLowerLimit()

Get the lower joint limit in radians.

Returns a float32

GetMotorSpeed()

Get the motor speed in radians per second.

Returns a float32

GetMotorTorque()

Get the current motor torque, usually in N-m.

Returns a float32

GetReactionForce( $inv_dt )

Get the reaction force on body2 at the joint anchor in Newtons. Implements Box2D::b2Joint.