Maya Plugin Power: Collision, Gravity, and Secondary Debris
The first things we want to change are the trajectory, velocity, and rotation of our bricks. In the Outliner window select the BLayer1 node. In the Attributes Editor change the Debris Random Trajectory, Debris Random Velocity, and Debris Random Rotation all to .5, which can be found under the Primary Debris Attributes under the Slab1 tab, as shown in Figure 2.
Let's add a standard gravity field from Maya’s Dynamics menu, by selecting Fields > Gravity. Make sure that everything is unselected, since you don’t want to attach it to anything specific yet. With this complete, open up the Blast window as before. Under the Particle tab are individual lists of the particles, collisions, and fields in the scene. Clicking on Update List ensures that the current list of scene elements is available to you. Select DebrisParticleShape1 from the Particles list and gravity-Field1 from the Fields list, as shown in Figure 3. Click the Attach Field button. The Bricks are now affected by the gravity field. Next we must tell Maya that a collision will occur between the bricks and the ground plane. Select the recently created polygon plane and click the New Collision button under the Particle tab, also shown in Figure 3. The plane is now listed as a particle collider and shows up in the Collisions list as pPlaneShape1. Select DebrisParticleShape1 from the Particles list and pPlaneShape1 from the Collisions List. Click the Attach Collision button (see Figure 4a). The bricks and ground plane now interact with each other.
When entering the various tabs under the Blast window in Blast Code, it is always a good idea to click the Update List or Update Attribute button if they are available. The various lists of elements that Blast Code is keeping track of does not refresh in real time, so it’s a good habit to adopt to click these buttons upon entering a tab.


![[FIGURE 2] Setting for random Rotation, Trajectory, and Velocity parameters.](http://www.awn.com/files/imagepicker/1/MayaPlugin02-fig8-35.jpg)























qswBrSop
Post new comment