Revolute joints



See here for a video explaining this topic: YouTube

To edit joints you must first be in joint edit mode (shortcut key 'J').

Revolute joint creation position
A revolute joint will be created with the joint anchor position for both bodies placed at the cursor position. In the image below, suppose we have a turret thingy which should rotate around the circular part of the static body. In this case we would place the cursor at the center of the circular part ('cursor to selection' can be helpful here) before creating the joint.


Moving joint anchors
Revolute joint anchor positions can be translated and rotated in a similar way to other items. The main difference is that one joint has two joint anchors. Initially the manipulation will start with the joint anchor for bodyA, and you can switch between joint anchors while manipulating them by hitting the same key that started the manipulation.

For example to begin translating joint anchors you would hit 'T', and this would begin translation of the joint anchor for body A. Hitting 'T' again would switch to translation of the joint anchor for body B.


Revolute joint limits
The limit positions and the enabled status for them can be set in the properties panel. Continuing from the example scene shown above, checking the 'Enable limit' setting will show the joint limits as green lines extending from the center. The line for the lower limit is a little shorter than that of the upper limit. With both limits initially being zero, the lines are on top of each other here, but we can see the small dots at the end of the lines.

The limit angles are specified with counter-clockwise being positive, so with values -60 and 20 for lower and upper respectively we would see a display like this.

The current position of the joint is shown by another green line - lets rotate that dynamic body a little so we can see this better.

For this example, to give the turret a range of motion that restricts it to pointing only downward, we could set the limits to say, -160 and -20.


Setting limits visually
Setting joint limits using the property panel is often unintuitive. Another way to set the limits is by moving body B and visually confirming the setting. Hitting the 'L' key will enter a temporary control mode where the body B of the joint will rotate with the mouse, around the joint anchor.

Initially, when this control mode is entered body B will be shown at the lower limit position. Hitting 'L' again will switch between setting the lower and upper limit positions. In the example case above with limits set at -160 and -20, here is what this display would look like.

Rotate body B with the mouse and click the left button to confirm the new limit position, or hit Escape to cancel the change.


Revolute joint motors
Joint motor values can be set in the properties panel. For most applications, the settings for joint motors will be controlled at runtime after loading the scene, but for motor settings that will not change throughout the lifetime of the scene, or just to experiment and see how different values behave, it can be handy to try them in R.U.B.E first.