Adobe ATMOSPHERE User Manual page 370

Table of Contents

Advertisement

358
APPENDIX E
createDragAction()
Creates and returns a new "DragAction".The action has the effect of slowing down the momentum of objects for
both direction and rotation.
solver
velocityDrag
angularVelocityDrag
dragAction
solverA.addAction(dragAction);
createFluidAction()
Creates and returns a new "FluidAction". A Fluid Action causes all dynamic physical models in the world to
behave as though the world were fi lled with a fl uid.
solver
fl uidAction
fl uidAction.damping
solver.addAction(fl uidAction);
createMagneticAction(strength, falloff, angle, maxDistance, position, direction)
Creates and returns a new "MagneticAction". This action simulates the effect of magnetic attraction or repulsion
on physical models. Note that only 'active' , 'falloff ' , and 'strength' may be modifi ed following the creation of the
Magnetic Action. All other properties are specifi ed at creation time only, and remain constant thereafter.
strength
falloff
angle
maxDistance
position
direction
solver
magAction = solver.createMagneticAction(strength, falloff, angle, maxDistance,
magAction.addPhysicalModel(box.physicalModel);
magAction.addPhysicalModel(cone.physicalModel);
solver.addAction(magAction);
createMotorAction(PhysicalModel, axis, spinRate, gain, maxTorque)
Creates and returns a new "MotorAction". This action simulates the effect of wind on a physical model.
axis
spinRate
gain
maxTorque
solver
motorAction
solver.addAction(motorAction);
= FastConstraintSolver();
= 1;
= 1;
= solverA.createDragAction(velocityDrag, angularVelocityDrag);
= FastConstraintSolver();
= solver.createFluidAction();
= 1;
= 100;
= 0;
= 2.0 * 3.1415927;
= 100;
= Vector( 0, 0, 0 );
= Vector( 0, 0, 0 );
= FastConstraintSolver();
= Vector( 0, 0, 0 );
= 3.0;
= 3.0;
= 3.0;
= FastConstraintSolver();
= solver.createMotorAction(PhysicalModel, axis, spinRate, gain, maxTorque);
position, direction);

Advertisement

Table of Contents
loading

Table of Contents