Actions; Dragaction - Adobe ATMOSPHERE User Manual

Table of Contents

Advertisement

360
APPENDIX E
strength
The strength or stiffness of the dashpot.
angularDashpot.damping = 0.5;
Methods
setRotation(rotation)
Sets the desired resting rotation relative to the fi rst PhysicalModel's coordinate frame.
angularDashpot.setRotation( Rotation('Z', 0.01) );
Code Sample
box1 = SceneGroup("./box.aer").add();
box2 = SceneGroup("./box.aer").add();
loader = new Object();
loader.timestep = function()
{
if(box1.loaded && box2.loaded)
{
box1.physicalModel = box1.createPhysicalModel(1);
box2.physicalModel = box2.createPhysicalModel(1);
solver
angularDashpot = solver.createAngularDashpot(box1.physicalModel, box2.physicalModel);
angularDashpot.damping = 0.5;
angularDashpot.strength = 0.5;
rotationValue = Rotation('Z', 0.00000001);
angularDashpot.setRotation(rotationValue);
solver.addAngularDashpot(angularDashpot);
removeAnimator(this);
}
}
addAnimator(loader);

Actions

DragAction

A Drag Action is a subtle force that is applied to all dynamic physical models in the world. The effect is that of slowing
down the momentum of objects for both direction and rotation. A Drag Action is created by a method of the FastCon
straintSolver(),and has global properties for velocity and angular velocity of drag (maximum = 1).
= FastConstraintSolver();

Advertisement

Table of Contents
loading

Table of Contents