Search⌘ K
AI Features

Joints of Objects

Explore different types of joints in Three.js using the Rapier physics engine to control object movement and rotation. Learn how to connect objects with fixed, spherical, revolute, and prismatic joints to create realistic physical constraints in 3D scenes.

Using joints to limit the movement of objects

Rapier also provides a way to limit the movement and rotation of rigid-bodies.

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 us to limit the movement of our 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. ...