Using joints to limit the movement of objects
Up until now, we’ve seen some basic physics in action. We’ve seen how various shapes respond to gravity, friction, and restitution, and how this affects collision. Rapier also provides advanced constructs that allow you to limit the movement of your objects. In Rapier, these objects are called joints. The following list gives an overview of the joints that are available in Rapier:
- Fixed joint: A fixed joint makes sure that two bodies don’t move relative to one another. This means that the distance and rotation between these two objects will always be the same.
- Spherical joint: A spherical joint makes sure that the distance between two bodies stays the same. The bodies, however, can move around one another on all three axes.
- Revolute joint: With this joint, the distance between the two bodies stays the same, and they are allowed to rotate on a single axis – for instance, a steering wheel, which...