Constraints

Push it to the limit

Constraints, or joints are used to limit how two bodies move relative to one each other. For example a hinge joint can be used to create a swinging sign. The type of the joints sets the limits what form of movement is possible. To create a constraint one needs to two bodies and a transform frames for each body.

Bodies: One of the two bodies that is linked need to be dynamic but the other one can be of any type.

Frame:

Types

Fixed

Completely constrained translation and orientation.

    • A spear stuck in the body of a ragdoll.
    • Breakable structures.

Slider / prismatic

Only movement along on of the frames shared axis is allowed.

D6

A free form joint that can be configured for a given degree of freedom to move or be locked together.

Distance

Keeps the origins of the frames within a certain distance.

Hinge / Single axis Hinge

Only rotation around a single shared axis of the frames is allowed.

    • Wheels
    • Knee
    • doors

Dual Axis Hinge

Limited to rotation around two axis.

    • Chain link
    • Shoulder / Thigh

Point / Spherical / Ball-and-socket

Translation is locked but no constraints on orientation. Keeps the origins of the frames the same but they are both free to rotate.

Physic API Names

Here are the table that map the constraints above to their respective or closest name in some of the Physics API's.