What's New in Director 8.5 > Working with Lights and Cameras > Cameras > Camera properties

 

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,200)

projectionAngle

Get and set

The vertical projection angle of the view frustum.

30.0

colorBuffer.clearAtRender

Get and set

TRUE (1) or FALSE (0) value indicating whether color buffer is or isn't cleared out after each frame.

If value is set to TRUE (1), the effect is similar to the trails ink effect, although it's limited to the redrawing of models within the sprite itself.

TRUE (1)

colorBuffer.clearValue

Get and set

Lingo color object defining color used to clear out buffer if colorBuffer.clearAtRender is TRUE (1).

rgb(0,0,0)

fog.enabled

Get and set

TRUE (1) or FALSE (0) value indicating whether camera adds fog to the scene.

FALSE (0)

fog.near

Get and set

Distance to start of fog.

0.0

fog.far

Get and set

Distance to maximum fog intensity.

1000.0

fog.color

Get and set

Lingo color object describing fog color.

rgb(0,0,0)

fog.decayMode

Get and set

How fog varies between near and far, with the following possible values:

#linear: density is linearly interpolated between fog.near and fog.far.

#exponential: fog.far is saturation point; fog.near is ignored.

#exponential2: fog.near is saturation point; fog.far is ignored.

#exponential

projection

Get and set

Method of determining the vertical field of view, which must be of type #perspective or #orthographic.

#perspective

fieldOfView

Get and set

A floating-point value specifying the vertical projection angle in degrees.

30.0

orthoheight

Get and set

The number of perpendicular world units that fit vertically into the sprite.

200.0

rootNode

Get and set

Property controlling which objects are visible in a particular camera's view. Its default value is the world, so all cameras you create show all nodes within the world. If, however, you change rootNode to be a particular node within the world, a sprite of the cast member will show only the root node and its children.

group("world")

overlay[index].loc

Get and set

Location, in pixels, of the overlay, as measured from the upper left corner of the sprite's rect to the overlay[index].source's regPoint.

point(0,0)

overlay[index].source

Get and set

Lingo texture object used as the source for this overlay.

None

overlay[index].scale

Get and set

Scale value used by a specific overlay in the camera's list of overlays.

1.0

overlay[index].regPoint

Get and set

Texture-relative rotation point, similar to a sprite's regPoint.

point(0.0)

overlay[index].rotation

Get and set

Rotation value used by a specific overlay in the camera's list of overlays.

O, O

overlay[index].blend

Get and set

Blend value used by a specific overlay in the camera's list of overlays. 100 is fully opaque; 0 is fully transparent.

100.0

overlay.count

Get and set

Number of overlays in use on this sprite.

0

backdrop[index].loc

Get and set

Location, in pixels, of the backdrop, as measured from the upper left corner of the sprite's rect to the backdrop[index].source's regpoint.

point(0,0)

backdrop[index].source

Get and set

Lingo texture object used as the source for this backdrop.

None

backdrop[index].scale

Get and set

Scale value used by a specific backdrop in the camera's list of backdrops.

1.0

backdrop[index].rotation

Get and set

Rotation value used by a specific backdrop in the camera's list of backdrops.

0.0

backdrop[index].regPoint

Get and set

Texture-relative rotation point, similar to a sprite's regPoint.

point(O,O)

backdrop[index].blend

Get and set

Blend value used by a specific backdrop in the camera's list of backdrops.

100.0

backdrop.count

Get

Number of backdrops in use on this sprite.

0

boundingSphere

Get

A list containing a vector and a floating-point value, with the vector representing the position and the value the radius of a bounding sphere surrounding the camera and all its children.

[vector (0,0,0), 0.0]

worldPosition

Get and set

Position of the camera in world coordinates. Shortcut for the command node.getWorldTransform()position.

Vector object