Adobe ATMOSPHERE User Manual page 305

Table of Contents

Advertisement

worldSpaceVelocity
the velocity of the object in world space coordinates (as a Vector). Just prior to setting the velocity for an object,
you should set the 'active' property to 'true' in case the object has come to rest. (For more information, see the
overview at the top of page.)
myPhysicalModel.active = true;
myPhysicalModel.worldSpaceVelocity = Vector(0, 5, -25);
worldSpaceAcceleration
the acceleration of the object in world space coordinates (as a Vector). The acceleration applies a force to the
center of mass that is proportional to the mass. This approach allows you to simulate a uniform gravitational
fi eld to all objects, such as the acceleration due to gravity. So, "acceleration" is an input to force generation, rather
than a measure of the velocity derivative. (For Earth's gravity at sea-level, set acceleration to (0.0, -32.0, 0.0) ).
Just prior to setting the acceleration for an object, you should set the 'active' property to 'true' in case the object
has come to rest. (For more information, see the overview at the top of page.)
myPhysicalModel.active = true;
myPhysicalModel.acceleration = Vector(10, 5, -25);
worldSpaceAngularVelocity
the angular velocity of the object in world space coordinates (as a Vector). Just prior to setting the
angularVelocity for an object, you should set the 'active' property to 'true' in case the object has come to rest. (For
more information, see the overview at the top of page.) Atmosphere angularVelocity is in the scale of Radians
per second.
myPhysicalModel.active = true;
myPhysicalModel.angularVelocity = Vector(10, 5, -25);
mass
the mass of the physical model as specifi ed during creation. This property may be modifi ed at any time. Since
you can read the volume of the physical model, you could set its mass to refl ect the density of a given substance
such as water. Be sure that the density value you use is in the same units system as the mass units / volume units
(volume units are feet cubed).'
physicalModel.mass = physicalModel.volume * density;
volume
the volume of the physical model computed from the geometry of the physical model. Note that if you created
a convex physical model, it will return the volume of the convex hull, not the original surface. Volume units are
feet cubed.
volumeForFloating = myBoat.physicalModel.volume;
active
A fl ag specifying whether this physical model should be processed by the physics engine at the current
moment(default = true). This property is very useful in establishing a more elegant base state for a physics
enabled scene. For example, suppose you load an array of bowling pins to be used as physical objects in a
bowling game. At initial load, the pins may wiggle somewhat as they experience gravity, and settle to the fl oor.
293
ADOBE ATMOSPHERE
User Guide

Advertisement

Table of Contents
loading

Table of Contents