DOCS

Joints

Joints constrain the way two physics bodies move relative to one another. A typical use for a joint would be to model a door hinge or a robotic arm.

3dverse supports two joints presently: fixed joint and revolute joint.

Fixed Joint

A fixed joint restricts a physics body’s movement to be dependent on another physics body. It locks the orientations and relative position of two physics bodies. This is somewhat similar to parenting but is implemented through physics rather than the scene graph hierarchy. You could use fixed joints to lock the movement of two bodies that you then want to easily break apart from each other, or to connect two physics bodies’ movement without parenting.

To create a fixed joint, create an entity and give it a joint component. Make sure to attach a physics rigid body to the constrainee, and either a rigid body / static body / null to the constrainer.

ConstraineeA rigid body entity that will be dependent upon the constrainer entity
ConstrainerAn entity that is a rigid or static body, or is simply null. If null, the constrainee is dependent upon world origin
Break ForceThe force that needs to be applied for this joint to break
Break TorqueThe torque that needs to be applied for this joint to break

Revolute Joint

A revolute joint can be used to connect two physics bodies so that they rotate around a single axis, mimicking real-world joints like hinges or pivots.

To create a revolute joint, create an entity and give it a joint component as well as a revolute joint component. Make sure to attach a physics rigid body to the constrainee, and either a rigid body / static body / null to the constrainer. For more info on the joint component check Fixed Joint.

AxisThe direction of the axis around which the constrainee swings. The direction is defined in the constrainee's local space.
AnchorThe position of the axis around which the constrainee swings. The position is defined in the constrainee's local space.
Previous
Physics Based Events