User Guide
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