User Guide

Working with Models and Model Resources 515
Cameras
Cameras act as view ports into the 3D world. By default, a newly added cameras view is
positioned at the world’s origin, the vector (0,0,0), and looks down the negative z-axis. Changing
a cameras
transform property affects the cameras position and orientation. When a 3D sprite is
created from a 3D cast member, the sprite uses one of the cast members cameras. Changing the
camera that the sprite is using changes what’s seen in the sprite.
Cameras can also have overlays and backdrops. Overlays are 2D images drawn in front of the
cameras lens. Backdrops are 2D images drawn behind the 3D scene. Backdrops provide a
background image for the scene regardless of which way the camera is pointing.
Camera properties
Use these properties to work with cameras:
Property Name Access Description Default
name Get and set Unique name of this camera.
If the camera was exported from a 3D
modeling program, the name is the name
assigned there.
None
parent Get and set The model, light, camera, or group that is
this light’s parent.
If the camera has no parent, it cannot
contribute light.
group
("world")
child.count
Get Number of immediate children (no
grandchildren) the camera has.
0
transform
Get and set Lingo transform object representing
camera’s position relative to its parent’s
transform.
The
transform.position property
gives the relative position;
transform.rotation gives the
relative rotation.
Identity transform
userData Get and set A property list associated with this camera.
The list defaults to the properties assigned
in the 3D modeling tool, but users can add
or delete properties at any time.
Properties assigned
in 3D modeling tool
hither Get and set A specified distance from the camera that
defines the near z-axis clipping of the view
frustum. Objects closer than hither are not
drawn.
5.0
yon
Get and set A specified distance from the camera that
defines the far z-axis clipping of the view
frustum. Objects farther than yon are
not drawn.
3.403e38
rect
Get and set The rectangle controlling the screen size
and position of the camera, with the
coordinates given relative to the upper left
corner of the sprite.
rect(0,0,320,2
00)
projection
Angle
Get and set The vertical projection angle of the view
frustum.
30.0