07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADOBE DIRECTOR BASICS<br />

3D: Controlling action<br />

Resolving collisions<br />

When a collision is detected, you decide what the result of the collision will be. Different situations require different<br />

solutions. Here are some examples.<br />

An avatar controlled by the user will simply be prevented from passing through a solid object. You may want to<br />

deflect the movement of the avatar so that it moves along the obstacle. See “Sliding along a wall” on page 237 for<br />

more details.<br />

An avatar that moves over a terrain needs to remain at the surface of the terrain at each step. See “Hugging Terrain”<br />

on page 238 for more details.<br />

A ball that collides with a wall will rebound and start traveling in a new direction. The impact with the wall may<br />

reduce its speed. See “Bouncing off a wall” on page 291 for more details.<br />

A ball that encounters a sloping surface may roll down the surface. See “Terrains” on page 319 for more details.<br />

Collision modifier<br />

When you attach the collision modifier to models, it will generate an event when the relative movement of two models<br />

may result in a collision. It gives you the option of stopping the movement of the models at the point near where the<br />

collision would occur.<br />

To test the collision modifier, download and launch the movie Collide.dir.<br />

Set the collision modifier properties and drag the models around. An asterisk appears when a collision is detected.<br />

Collide.dir allows you to set the properties of the collision modifier and visualize collision data.<br />

Adding the collision modifier to a model<br />

The following command adds the #collision modifier to model 2, named “HighImpact”, of the member “3D”:<br />

Last updated 8/26/2011<br />

280

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!