2009

objects attached by a spring is limited by the deformation of the spring. A
train can move only along the path defined by a rail due to the collisions of
its wheels with the rail. In many cases, though, it is preferable to specify
explicitly the effect of those objects (hinge, spring, rail) rather than model
them and simulate them. This is what constraints are for.
A constraint lets you limit the way an object can move. Once you specify a
constraint, reactor tries to enforce it during the simulation. For example, you
can use a
Hinge on page 3969 constraint to simulate the effect of an actual hinge
on an object: No translation is allowed, and rotation is allowed around only
one axis. Similarly, you can use a Spring on page 3930 constraint to simulate
the effect of a spring (translation is limited to a certain length); or a
Point-Path
on page 3995 constraint to simulate the effect of a rail (translation and
orientation are limited to follow a path).
Sometimes you will have a system of many objects constrained together. For
example, if you want to simulate a character falling down the stairs, you might
constrain the different bones of the character using many constraints (like
Rag Doll on page 3948 or Hinge on page 3969). Because all the bodies are connected,
maintaining one constraint may affect the other constraints, so it is better if
they are simulated together, so they are aware of each other. Thus, some
constraints require you group them so they can be solved as a system. Those
constraints are called
Cooperative Constraints on page 3943 and are usually
more stable, although they can be slightly slower to simulate. The other
constraints, Simple Constrains on page 3930, cannot be grouped and therefore
are more prone to instability in complex scenes, but are faster to simulate.
Constraint Spaces
In rigid body dynamics, each body has six degrees of freedom to move:
three translational degrees of freedom
three rotational degrees of freedom
Each type of reactor constraint can remove or limit one or more of these
degrees of freedom for its constrained bodies.
Depending on the number and type of these limitations, we get different types
of constraint, from the simple
Point-Point on page 3975 constraint to the much
more complicated
Rag Doll on page 3948 constraint. For example, with a
Point-Point constraint, the constrained objects are completely free to rotate
around the constraint pivot point, but have no linear freedom relative to each
other in any direction; they are attached together at the point. However, with
Constraints | 3927