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 />

property pLastUpdate<br />

on enterFrame(me)<br />

vMS = the milliseconds<br />

vElapsed = vMS - pLastUpdate<br />

pLastUpdate = vMS<br />

vTimeStep = min(vElapsed / 1000.0, 0.1)<br />

member("Physics").timeStep = vTimeStep<br />

member("Physics").simulate()<br />

end enterFrame<br />

In the TimeStepMode.dir movie, you can test the efficiency of this technique by checking the Adjust TimeStep check box.<br />

Physics world properties<br />

A newly initialized Physics world has no gravity, and all its other properties are set to minimum values. A Physics<br />

world has eight properties whose values can be modified at any time. These values act as defaults for all rigidBody<br />

objects for which no value has been set for these properties.<br />

gravity (cannot be set independently on individual objects)<br />

restitution<br />

friction<br />

linearDamping<br />

angularDamping<br />

sleepThreshold<br />

sleepMode<br />

contactTolerance<br />

To explore the properties of a Physics world, download and launch the movie FirstWorld.dir.<br />

Last updated 8/26/2011<br />

300

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

Saved successfully!

Ooh no, something went wrong!