07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADOBE DIRECTOR BASICS<br />

3D: Controlling action<br />

2 Click the Push Cube button, and note how far the Cube moves before it comes to a halt.<br />

3 Use the popup menu to change from #energy to #linearVelocity for the sleepMode.<br />

4 Click the Push Cube button again.<br />

5 Compare the distance the Cube traveled this time. It is likely to have stopped much sooner when #linearVelocity<br />

is selected.<br />

6 With #linearVelocity selected for the sleepMode, click on the Spin Cube button. Count the seconds as the Cube<br />

turns until the Cube Is Sleeping check box becomes checked.<br />

7 Use the popup menu to change from #linearVelocity to #energy for the sleepMode.<br />

8 Click the Spin Cube button again.<br />

9 Compare the number of seconds that the Cube spins before it comes to a halt.<br />

You can see that the #linearVelocity setting is more aggressive with linear motion through space and less aggressive<br />

with angular motion. If, for example, you want to simulate a bicycle accident where the bicycle comes to a sudden stop<br />

but the wheels of the overturned bicycle keep spinning for a long time, choose the #linearVelocity setting.<br />

contactTolerance<br />

The contactTolerance property determines how many world units an object must penetrate into another before a<br />

collision is detected. A recommended value is 2% of the object's longest dimension. For the cube, which has sides 1<br />

unit long, a good value would be 0.02.<br />

Increasing contactTolerance allows objects to interpenetrate deeper before a collision is detected<br />

If you set this value too high, then collisions may fail to be detected at all, and unexpected behavior may occur.<br />

Rigid bodies<br />

To make a 3D model behave as if it were solid, you can create a rigidBody object for it. A rigidBody object is an abstract<br />

code object with no visible representation on the screen. Often, its geometry will be much simpler than the geometry<br />

of the visible model that it is attached to. The Physics simulation will use the geometry of each rigidBody object to<br />

detect collisions. Using simplified geometry improves performance.<br />

Last updated 8/26/2011<br />

307

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

Saved successfully!

Ooh no, something went wrong!