Adobe ATMOSPHERE User Manual page 300

Table of Contents

Advertisement

288
APPENDIX E
lockToActor
When true the camera's position and orientation are copied from the actor's position and head orientation every
time step.
// Make the camera track the actor's position
// and head orientation
camera = application.getView(0).getCamera(0);
camera.lockToActor = true;
preferenceShowMyAvatar
Returns the current state of the checkbox in the Actor preferences "Show My Avatar", as well as the toggle on the
toolbar. This property is "read only".
if (application.preferenceShowMyAvatar) { ... }
showAvatar
Controls the third person view of the user avatar in the Actor window.
application.showAvatar = true;
Methods
dist(Vector)
Returns the distance between the supplied position and the camera's position.
camera = application.getView(0).getCamera(0);
radialDistance = camera.dist(actor.position);
setPosition(Vector)
Sets the camera position to the Vector specifi ed.
camera = application.getView(0).getCamera(0);
camera.setPosition( Vector( 0, 7, 0) );
// 7 units high at the reference point
getPixelXCoordFromRayDirection(Vector rayDirection)
Returns the pixel x coordinate in the image plane for a given ray direction from the camera.
camera = application.getView(0).getCamera(0);
direction = Vector(1.0, 0.0, 0.0);
xValue = = camera.getPixelXCoordFromRayDirection(direction);
getPixelYCoordFromRayDirection(Vector rayDirection)
Returns the pixel y coordinate in the image plane for a given ray direction from the camera.
camera = application.getView(0).getCamera(0);
direction = Vector(1.0, 0.0, 0.0);
yValue = = camera.getPixelYCoordFromRayDirection(direction);
getRayDirectionFromPixelCoords(x, y)
Returns the ray direction that corresponds to the given pixel.

Advertisement

Table of Contents
loading

Table of Contents