Skip to content

UIRevoluteJoint

YinLijun edited this page Mar 3, 2015 · 1 revision

UIRevoluteJoint is revolute joint. You can pin bodyA and bodyB together, or pin a body on ground body. You can set the motor, limitation and other parameters.

The revolute joint angle is positive when bodyB rotates CCW about the angle point. Like all angles in Box2D, the revolute angle is measured in radians. By convention the revolute joint angle is zero when the joint is created using Initialize(), regardless of the current rotation of the two bodies.

In some cases you might wish to control the joint angle. For this, the revolute joint can optionally simulate a joint limit and/or a motor.

A joint limit forces the joint angle to remain between a lower and upper bound. The limit will apply as much torque as needed to make this happen. The limit range should include zero, otherwise the joint will lurch when the simulation begins.

A joint motor allows you to specify the joint speed (the time derivative of the angle). The speed can be negative or positive. A motor can have infinite force, but this is usually not desirable. Recall the eternal question:

It is a subclass of UIElement.

Screenshots


1

Clone this wiki locally