Adobe ATMOSPHERE User Manual page 318

Table of Contents

Advertisement

306
APPENDIX E
worldSpaceTransform
The worldSpaceTransform is the combined worldSpacePosition and worldSpaceOrientation of the object.
// set the worldSpaceTransform of the object to a known anchor
myObject.worldSpaceTransform = myAnchor3.worldSpaceTransform;
bounds
The min and max extent of the SceneGroup in local coordinates, relative to the SceneGroup's Eye position and
orientation, expressed as an array of two Vectors [min, max].
spider = SceneGroup("./spider.aer");
// Make spider's feet just touch the fl oor
height = fl oorHeight - spider.bounds[0].y;
spider.position = Vector(spider.position.x, height, spider.position.z);
visible
Allows the SceneGroup to be visibly removed from the rendered scene. Note that the SceneGroup geometry will
still be present; this would be useful for creating an object which causes collisions, but which is invisible.
box = SceneGroup("./box.aer");
box.visible = false;
attachedToParent
A fl ag that is set to true when a SceneGroup is attached to another SceneGroup using the addTo() method. A
SceneGroup that is attached to it's parent will be transformed with the parent. If this fl ag is then set to false the
child SceneGroup will act as an independant SceneGroup.
box1 = SceneGroup("./box.aer");
box2 = SceneGroup("./box.aer");
loader = new Object()
loader.timestep = function()
{
if (!box1.loaded && !box2.loaded) { return; }
box1.add();
box2.addTo(box1);
box1.physicalModel = box2.createPhysicalModel(5);
box2.physicalModel = box2.createPhysicalModel(10);
box2.attachedToParent = false;
removeAnimator(this);
}
addAnimator(loader);

Advertisement

Table of Contents
loading

Table of Contents