
Cameras
391
isInWorld()
Returns a Boolean value indicating if the camera is
currently in the world (TRUE) or not (FALSE). This is
useful for detecting if a given node's parent-heirarchy
tree terminates with the world group object or not.
TRUE (1)
or
FALSE (0)
registerScript
(
eventName,
handlerName,
scriptInstance
)
Registers a handler named
handlerName
that is called in
the
scriptInstance
when the member method
sendEvent()
is called with
eventName
as an argument.
If
scriptInstance
is 0, a movie script handler is called.
The user defines what
eventName
is. The
eventName
specified can be one of a default set of events or a user
defined custom event. The default events are
#collideAny, #collideWith, #animationStarted,
#animationEnded, #timeMS.
Nothing
translate
(
direction
Vector
,
relativeTo
)
Moves the camera
directionVector.length()
in the
direction of the directionVector.
The relativeTo argument is optional and defaults to
#self
.
Nothing
translate(
x
,
y
,
z
,
relativeTo
)
Moves the camera distance
x
along the
x
-axis, distance
y
along the
y
-axis, and distance
z
along the
z
-axis.
The
relativeTo
argument is optional and defaults to
#self
.
This method can also be written as
translate(vector(
x
,
y
,
z
)
relativeTo
)
.
Nothing
rotate(
x
,
y
,
z
,
relativeTo
)
Rotates the camera by
x
degrees around the
x
-axis,
y
degrees around the
y
-axis, and
z
degrees around the
z
-axis.
The
relativeTo
argument is optional and defaults to
#self
. If included, it defines the coordinate space of the
axes.
This method can also be written as
rotate
(vector(
x
,
y
,
z
)
relativeTo
)
Nothing
rotate (
position
,
axis
,
angle
,
relativeTo
)
Rotates the camera around the axis vector in the
specified position the specified number of degrees. The
relativeTo
argument is optional and defaults to
#self
.
Nothing
pointAt(
world
Position, worldUp
)
Points the camera’s "front" at the world Position and
then tries to align the node's "up" with the worldUp
specified, and that the node's "front" and "up" are
determined by the node's
pointAtOrientation
property.
Both the object-relative axes are defined by the
pointAtOrientation
property. Default values are an
object-relative forward direction of vector (
0
,
0
,
-1
) and
an object-relative up direction of vector (
0
,
1
,
0
).
Nothing
getWorld
Transform()
Calculates and returns a transform that converts object-
relative positions for this camera into world-relative
positions.
A transform object
Method
Description
Returns
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...