This section introduces some common concepts that you'll need to understand to work with any of the reactor constraint types.
You use constraints in reactor to specify limitations in the movements of objects. Without constraints, the movement of objects could be limited only by collisions and deformations. This is the case in the real world: For example, a door's movement is limited by a set of pieces that form a hinge; the collisions between those objects limit the movement of the door. The motion of two 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 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 constraint to simulate the effect of a spring (translation is limited to a certain length); or a Point-Path 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 or Hinge). 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 and are usually more stable, although they can be slightly slower to simulate. The other constraints, Simple Constrains, cannot be grouped and therefore are more prone to instability in complex scenes, but are faster to simulate.
In rigid body dynamics, each body has six degrees of freedom to move:
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 constraint to the much more complicated Rag Doll 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 a Rag Doll constraint, the objects not only have no linear freedom, but their possible relative orientation is also restricted.
In each constraint, these angular and linear limits are defined in terms of the constraint’s coordinate system or constraint space. Because a constraint restricts the movement of its objects relative to each other, a constraint also needs to maintain a mapping from each object’s local space to the constraint space. reactor lets you manipulate the constraint space in each object's local space separately, as you'll see in the Working With Constraint Spaces section.
Each reactor constraint can have two objects: a parent object and a child object. Although two-bodied constraints actually restrict the possible movement of both bodies, it is often simpler to specify how one object is allowed to move relative to the other one, particularly when you are using limits. With reactor, you specify how the child object can move relative to the parent.
For some constraints, it makes no difference which object is the parent and which is the child. For instance, if you use a Point-Point constraint to attach two objects together at a common point, it works in exactly the same way regardless of how you specify the attached objects.
However, with the more complex Rag Doll constraint, which you typically use to model body joints, it's important to specify which object is the parent. This is because this constraint lets you specify a number of limits on how the child can move relative to the parent object. For example, when you move your torso, your arm always moves with it. So when modeling a shoulder joint, you would specify that the torso object is the parent, making the arm object the child. You can then specify limits on the arm's movement relative to the torso.
When you constrain an object to a point in world space rather than another object, the constrained object is the child object and there is no parent object.
For most constraints, by default the constraint space is aligned with the child body. This means that the constraint pivot/attachment point is positioned at the child object's pivot point, and the constraint space takes its orientation from the child body's local space. The exceptions to this are the constraints with two attachment points, Springs and Stiff Springs, and the Point-Path constraint, each of which has its own default alignment.
You can move the constraint space relative to each of the bodies by going to the constraint's Parent Space or Child Space sub-object level in the modifier stack, and then using the Move and/or Rotate tools. The space will then maintain its position and/or orientation relative to the corresponding object during the simulation.
reactor also provides some quick shortcuts for aligning constraint spaces, available with each constraint. These are:
Align Spaces To Child Body—This is the default alignment for all constraints except Spring, the Stiff Spring variant of Point-Point, and Point-Path.
Align Spaces To Parent Body—The constraint space is aligned with the parent body: The pivot point is positioned at the parent body's pivot point, and the constraint space takes its orientation from the parent object's local space.
Align Spaces To Child Space—Aligns the parent and child constraint spaces with the child's constraint space. So, for instance, if you move the constraint space relative to the child, you can use this option to move the parent's constraint space into alignment with it.
Align Spaces To Parent Space—Aligns the parent and child constraint spaces with the parent's constraint space. So, for instance, if you move the constraint space relative to the parent, you can use this option to move the child's constraint space into alignment with it.
Certain constraints have additional alignment options:
Align Spaces To Each Body—(Spring and Point-Point > Stiff Spring only) This option aligns each local constraint space (and hence the spring attachment point) with the relevant body, so each body's attachment point is at its pivot. It also sets the spring length to the current distance between the nodes. This is the default alignment for springs and stiff springs.
Align Parent Space To Path—(Point-Path constraint only) This option aligns the parent space with the local space of the shape used for the constraint's path. This is the default parent space alignment for the Point-Path constraint.