ADOBE DIRECTOR 11.0
User Guide
421
4
Set the properties of the Physics world using Lingo: The Physics world is initialized with the default set of
properties. You must set the world properties like gravity, contactTolerance, and damping.
5
Step the simulation: Call the simulate() method to step the Physics world. Each simulate call updates the Physics
with new positions of the bodies based on mathematical calculations. The appropriate collision responses are also
determined by resolving the collision according to the object properties.
You must call the simulate() method in each exitframe() for a smooth Physics simulation The simulation progresses
based on the
timestep
and
substep
values that are set.
6
Apply physics to the 3D models: 3D models can be of various geometric shapes. The physics simulation can
approximate the complexity of the model by assigning a proxy geometry while creating the rigid body. The proxy
geometries are box, sphere, convex shape, and concave shape.
You must provide access to this displayed geometry information before creating the rigid body by adding a
#meshdeform modifier to the 3D model.
After the rigid body is created, you can set various properties or apply dynamics to it by using Lingo.
7
Stopping the simulation: Call destroy() when the movie is stopped to stop the physics simulation.
Tuning the Physics Engine
The Physics simulation is based on numerous mathematical calculations and you may observe unstable behavior due
to numeric tolerances. The scene will then have to be tuned to achieve a stabler simulation.
You can tune the following parameters:
•
contactTolerance of the world and rigid body
•
timestep of the world
•
substeps of the world.