User Guide

ADOBE ATMOSPHERE 287
User Guide
Functions are also supplied for converting pixel coordinates to rays, to ease the creation of ray-test queries. Finally, the
2D center of projection may be shifted relative to the image plane for special effects and unusual projections.
Important Note: A Javascript (“PlayerInit.js”) which is included with the Player product is currently modifying fi ve of
these properties: position, orientation, transform, lockToActor, and showAvatar. Since this Javascript provides camera
control by default, and since there is currently just one camera, it may not be possible to modify these fi ve properties
with any dependable results.
Properties
type
The object’s type. Returns “Camera.
if (foo.type == ‘Camera’) { ... }
orientation
The rotational orientation of the Camera (as a Rotation).
// Rotate the camera to have the same
// orientation as the actor
camera = application.getView(0).getCamera(0);
camera.orientation = theActor.orientation;
position
The position as a Vector.
// Place the camera at x=10, y=5, z=-25 in the world
camera = application.getView(0).getCamera(0);
camera.position = Vector(10, 5, -25);
transform
The Transform object representing the combined position and orientation of the camera.
// Smoothly animate between EntryPoints ep1 and ep2
// (including their orientations) over 100 frames:
camera = application.getView(0).getCamera(0);
camera.n = 0;
camera.timestep = function()
{
this.transform = ep1.transform.blend(ep2.transform, this.n++/100);
}
addAnimator(camera);
eldOfView
The fi eld of view of the camera in degrees. Can range from 0 to 180, default is 80.
camera = application.getView(0).getCamera(0);
camera.fi eldOfView = 100;