Cooperative Constraints

Cooperative constraints are more stable than simple constraints, but can be more computationally expensive to simulate. For a cooperative constraint to take part in the simulation, you first need to add it to a Constraint Solver. The solver acts as a container for the cooperative constraint in a particular Rigid Body Collection, and performs all the calculations necessary for the constraints to work together.

The following constraint types are cooperative constraints:

Common Properties

The following properties are shared by all cooperative constraints:

Strength and Tau

These properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

Strength

The constraint applies an impulse to each attached body in order to maintain the constraint, based on the relative velocities of the attached bodies. The Strength parameter governs the percentage of this impulse the constraint will apply to each object. If this is sufficient, then the constraint is maintained.

Tau

If the constraint drifts; that is, if the attached objects reach a state where the constraint isnâ€™t satisfied, then reactor applies a corrective force to rectify this drift. An impulse is calculated to rectify the drift in a constraint system; the Tau parameter governs the percentage of the corrective impulse the constraint applies to each object.

NoteTau is unavailable in the Havok 3 engine.

Breakable Constraints

A breakable constraint stops working when a specified threshold is exceeded. For example, you could use a breakable constraint to make a door that flies off its hinges when kicked hard enough. You make a constraint breakable by turning on its Breakable check box. It then ceases to exert impulses on its constrained bodies if its limits are exceeded during the simulation.

Breakable

Turn on to make the constraint breakable.

The Linear and Angular parameters apply only to Havok 1, and the Theshold parameter applies only to Havok 3.

Linear

The maximum linear impulse the breakable constraint can apply before it breaks. Available in Havok 1 only.

Angular

The maximum angular impulse the breakable constraint can apply before it breaks. Available in Havok 1 only.

Threshold

A generic impulse parameter that governs the overall breakability of the constraint. Larger values make the constraint harder to break. Available in Havok 3 only.

• Constraint Solver

The Constraint Solver acts as a container for the cooperative constraints in a particular Rigid Body Collection, and performs all the calculations necessary for the constraints to work together.

• Rag Doll Constraint

The Rag Doll constraint lets you realistically simulate the behavior of body joints, such as hips, shoulders, and ankles. Once you decide the degree of movement a joint should have, you can model it by specifying limiting values for the Rag Doll constraint.

• Defining Rag Doll Limits

The Rag Doll constraint is useful for simulating complex joints, like those found in some human and animal joints (shoulders, hips), that cannot be properly simulated by simpler constraints like Hinge or Point-Point constraints.

• Hinge Constraint

The Hinge constraint allows you to simulate a hinge-like action between two bodies. reactor lets you specify an axis in local space for each body, with a position and a direction. During the simulation, the two axes attempt to match position and direction, thereby creating an axis around which the two bodies can rotate. Alternatively, you can hinge a single body to an axis in world space.

• Point-Point Constraint

The Point-Point (point-to-point) constraint lets you attach two objects together, or an object to a point in world space. It forces its objects to try to share a common point in space. The objects can rotate freely relative to each other, but always have the attachment point in common. When you set up the constraint, the point is defined in the object space of each object involved. During the simulation the constraint tries to apply forces to the objects so that the two pivot points defined by the two objects match.

• Prismatic Constraint

The Prismatic constraint serves as a constraint between two rigid bodies, or a rigid body and the world, that allows its bodies to move relative to each other along one axis only. Rotations, as well as the remaining two translation axes, are fixed. For example, you could use a Prismatic constraint when creating a forklift truck.

• Car-Wheel Constraint

You can use this constraint to attach a wheel to another object; for instance, a car chassis. You can also constrain a wheel to a position in world space. During the simulation, the wheel object is free to rotate around a spin axis defined in each object's space. Linear motion is allowed for the wheel along a suspension axis. You can also add limits to the wheel's movement along this axis. The constraint's child body always acts as the wheel, while the parent acts as the chassis.

• Point-Path Constraint

The Point-Path constraint allows you to constrain two bodies so that the child is free to move along a specified path relative to the parent. Alternatively, you can create a single-bodied version of the constraint, where the constrained body can move along a path in world space. The child body's orientation is not restricted by the constraint.