2010

Table Of Contents
2 Move the stack of barrels upwards along Y (by half the height of a barrel)
so they are not intersecting the ground plane.
move -r 0 (0.5*$diameter_barrel) 0;
3 Add a gravity field to the selected geometry by entering the following in
the Script Editor.
performDynamics 1 Gravity 0;
When a gravity field is added to the geometry, rigid body nodes are
automatically added to the geometry.
To create a plane for the barrels to simulate against
1 Make a plane for the barrels to simulate against by typing the following:
polyPlane -height 100 -width 100;
2 With the plane selected, add a rigid body node to the plane by typing
the following:
rigidBody -passive;
To view the simulation
Click the play button on the time slider to view the dynamics simulation.
682 | Chapter 13 Scripting in Maya