User Guide
ADOBE ATMOSPHERE 191
User Guide
6 Select File > Publish > World (Ctrl+P) to see the car object rotating in the scene.
i
By changing the axis and rpm properties, you can control the axis about which the object rotates and its speed.
The rotateContinuous script can be used to rotate objects in the scene.
Working with physical models
Atmosphere’s JavaScript API allows access to the built-in Havok physics-simulation engine. You can use JavaScript to
create and control real-world physics simulations including collisions, gravity, water, wind and magnetism.
A good example of physics engine scripting is the createPhysicalModel script preset. This script causes objects to act
as though they are in the real world and subject to physical laws such as gravity and collisions. Objects controlled by
this script will fall in the environment and otherwise behave just as you’d expect. Physical models have properties for
acceleration, and angular acceleration, friction, inertiaScale, mass and restitution.
The createPhysicalModel script is asscociated with an entire Solid Object. If you want several objects to behave
independently, then each object must have been defi ned as a separate Solid Object in the Scene Hierarchy.
Tutorial: Creating a Free Moving Soccer Ball
You can use the createPhysicalModel script to make a soccer ball that moves like a real one. Follow these steps.










