User Guide
ADOBE ATMOSPHERE 365
User Guide
solverA.addAction(armature.action);
removeAnimator(armature);
}
addAnimator(armature);
SingleDragAction
A Single Drag Action is a subtle force that is applied to a specifi ed dynamic physical model. The effect is that of
slowing down the momentum of the object for both direction and rotation. This module differs from Drag Action in
that the effect can be limited to one object. Numerous Single Drag Actions can be created so that different physical
models can experienced customized drag.
A Single Drag Action is created by a method of the FastConstraintSolver(), and has adjustable properties for velocity
and angular velocity of drag (maximum = 1).
It should be noted that for any of the physics based constraints or actions, it is necessary to assign reasonable mass
values when creating the physical models so that physics processing does not become unstable (driven out of scope).
The guidelines for mass and inertia are decribed in the method createPhysicalModel().
Properties
angularVelocityDrag
The strength of the drag as it applies to object angular velocity (rotation).
singleDragAction.angularVelocityDrag = 1;
velocityDrag
The strength of the drag as it applies to object velocity.
singleDragAction.velocityDrag = 1;
Code Sample
cone = SceneGroup(“./cone.aer”).add();
cone.anchor = stageModel.getSolidObject(0).rootPrimitive.fi nd(“./anchor1”);
cone.transform = cone.anchor.transform;
cone.solver = FastConstraintSolver();
cone.timestep = function(now)
{
if (!cone.loaded) return;
cone.physicalModel = cone.createConvexPhysicalModel(1);
cone.physicalModel.collide = true;
cone.physicalModel.acceleration = Vector(0.0, -32.0, 0.0);
cone.velocityDrag = 1;
cone.angularVelocityDrag = 1;










