User Guide
366 APPENDIX E
cone.singleDragAction = cone.solver.createSingleDragAction( cone.physicalModel,
cone.velocityDrag, cone.angularVelocityDrag );
cone.solver.addAction(singleDragAction);
removeAnimator(cone);
}
addAnimator(cone);
SimpleRigidWindAction
As the name implies, a “SimpleRigidWindAction” simulates the effect of wind on a physical model. The wind action
is created by a method of the “FastConstraintSolver”. A single SceneGroup is controlled for each wind action, and
numerous wind actions can be created. In addition, there are adjustable properties for wind strength and direction, as
decribed below.
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
active
A boolean fl ag controlling whether the wind effect is currently processed. (default = true)
simpleRigidWindAction.active = true;
direction
The direction of the wind as a Vector.
simpleRigidWindAction.direction = Vector( 0.0, 0.0, -1.0 ); //straight away in “Z”
strength
The relative strength of the wind. Useful values range from 0 - 100.
simpleRigidWindAction.strength = 3;
Code Sample
stage = stageModel.getSolidObject(0).rootPrimitive;
sphere = SceneGroup(“./sphere.aer”).add();
sphere.anchor = stage1.fi nd(“./anchor”);
sphere.position = sphere.anchor.position;
sphere.solver = FastConstraintSolver();
sphere.onLoad = function()
{
sphere.physicalModel = sphere.createPhysicalModel(1);
sphere.physicalModel.collide = true;
sphere.physicalModel.acceleration = Vector( 0.0, -32.0, 0.0 );










