9
818 Chapter 13: reactor
If the objects are linked in 3ds Max, reactor
will automatically make the link’s child object
the constraint child and the link parent the
constraint parent. Otherwise, reactor will
examinethesceneandtrytochoosean
appropriate parent and child.
In addition, if the constrained objects are
already added to a collection, reactor will
disable collisions between them (except in the
case of spr ings (page 2–727)).
Collection Creation
This applies to all the reactor collection types: rigid
body collections (page 2–723), soft body collections
(page 2–788), cloth collections (page 2–781),and
rope collections (page 2–792).Italsoappliestothe
Fracture (page 2–770) and Constraint Sol ver (page
2–736) helpers.
To create a collection and add bodies in a single step:
1.
Create the object(s) to add to the collection,
then ensure that they are all selected.
2. Create the collection by using the reactor
toolbar, menu or quad menu. The collection
automatically appears in the viewport, and
as you w i ll see in the collection’s Properties
rollout, your objects are now added to the
collection.
The R ag Doll Script
This example script lets you quickly set up a simple
humanoid character, using a mixture of Rag Doll
(page 2–737) and Hinge (page 2–747) constraints
to limit the movement of the character’s limbs. You
canusethesamplehumanoid,orcreateyourown
character using the provided naming conventions
and the script will set up its constraints.
Alternativelyyoucanusethescriptasabasisfor
creating your own custom rag doll script.
Procedures
Tocreatethesampleragdoll:
1.
Run this script:
• menu bar > MAXScript > Run Script >
rctRagDollScript.ms
• Utilitiespanel>MAXScript>RunScript>
rctRagDollScript.ms
The Ragdoll dialog opens, with two rollouts:
Create Humanoid and Constrain Humanoid.
2. OntheCreateHumanoidrollout,ensurethat
your chosen creation options are on, and then
click Create Humanoid. A humanoid figure
appears in the viewport.
3. To set up the humanoid’s constraints, ensure
that your new humanoid is hig h lig hted in the
Humanoids list on the Constrain Humanoid
rollout (by default, it’s called Ragdoll) and that
your chosen options are active on the rollout.
4. Click Constrain Humanoid.
The script creates Rag Doll constraints and
Hinge joints with appropriate limits for the
humanoid. In addition, if Create RBCollection
andCreateCSolverareon,thescriptcreates
these helpers and adds the bodies and
constraints to them.