MACROMEDIA DIRECTOR MX 2004-USING DIRECTOR Use Manual page 351

Hide thumbs Also See for DIRECTOR MX 2004-USING DIRECTOR:
Table of Contents

Advertisement

Method
rotate (position,
axis, angle,
relativeTo)
scale(uniform
Scale)
scale(x, y, z)
pointAt(world
Position, worldUp)
getWorld
Transform()
Moving models
Because the 3D world has no absolute frame of reference, moving and rotating is much more
complex than in 2D, where all movement is in relation to screen position.
In 3D, everything is drawn relative to the camera's frame of reference. If the camera is behind an
object, when the object moves to the left relative to the center of the world, or world origin, it
appears to move toward the right of the screen.
Each piece of position and orientation information can be expressed relative to one or more
frames of reference. A model's transform property, for instance, expresses its position and rotation
relative to the model's parent. In general, there are four frames of reference to consider: relative to
the object (model, light, camera) itself, relative to the object's parent, relative to the world, and
relative to some other object.
Object-relative: When you create a model in a 3D modeling program, you build it relative to
its own frame of reference. For instance, when you create a model of a car, the front of the car
may be pointed along its z-axis and the antenna may be pointed along its y-axis. To move such
a car forward (along its z-axis) regardless of which direction it is pointing relative to the camera
or the world, use
The car model might have wheel models as children. To rotate the wheel of a car relative to
itself, rather than relative to its parent (the car), use the following script:
wheel.rotate(0,10,0)
Description
Rotates the model around the axis vector in the
specified position the specified number of degrees.
The
argument is optional and
relativeTo
defaults to
.
#self
Scales the model the same amount in all directions. Nothing
Scales the model by a factor of
dimension,
in the
y
the
dimension. Scaling is applied in
z
object-relative space.
Points the node'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
property.
Both the object-relative axes are defined by the
pointAtOrientation
an object-relative forward direction of vector (
) and an object-relative up direction of vector (
1
).
0
Calculates and returns a transform that converts
object-relative positions for this model into world-
relative positions.
car.translate(0,0,10)
in the
x
x
dimension, and
in
y
z
pointAtOrientation
property. Default values are
. To turn the car left, use
Returns
Nothing
Nothing
Nothing
,
,
0
0
-
,
,
0
1
A transform object
car.rotate(0,45,0)
Models
.
351

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents