Required if applying a rotation about an arbitrary axis passing through a point in space.
angle
Specifies the amount of rotation about the axis
Optional. Specifies which coordinate system axes are used to apply the desired
relativeTo
rotational changes. The
•
applies the increments relative to the node's local coordinate system (the X, Y and Z
#self
axes specified for the model during authoring). This value is used as the default if you use the
command with a node reference and the
rotate
•
applies the increments relative to the node's parent's coordinate system. This value is
#parent
used as the default if you use the
relativeTo
•
applies the increments relative to the world coordinate system. If a model's parent is
#world
the world, than this is equivalent to using
•
nodeReference
the increments relative to the coordinate system of the specified node.
Example
The following example first rotates the model named Moon about its own Z axis (rotating it in
place), then it rotates that same model about its parent node, the model named Earth (causing
Moon to move orbitally about Earth).
member("Scene").model("Moon").rotate(0,0,15)
member("Scene").model("Moon").rotate(vector(0, 0, 5),
member("Scene").model("Moon"))
The following example rotates the model Ball around a position in space occupied by the model
named Pole. The effect is that the model Ball moves in orbit around Pole in the x-y plane.
polePos = member("3d Scene").model("Pole").worldPosition
member("3d Scene").model("Ball").rotate(polePos, vector(0,0,1), \
5, #world)
See also
pointAt, preRotate,
(backdrop and
runMode
Usage
the runMode
Description
Function; returns a string indicating the mode in which the movie is playing. Possible values are
as follows:
•
—The movie is running in Director.
Author
•
—The movie is running as a projector.
Projector
•
BrowserPlugin
environment, such as LiveConnect or ActiveX.
The safest way to test for particular values in this property is to use the
helps avoid errors and allows partial matches.
relativeTo
rotate
parameter is not specified.
allows you to specify a node to base your rotation upon, the command applies
rotation
(transform),
overlay), preScale(),
—The movie is running as a Shockwave Player plug-in or other scripting
.
axis
parameter can have any of the following values:
relativeTo
command with a transform reference and the
.
#parent
rotation (engraver
transform (property)
parameter is not specified.
shader),
rotation
operator. This
contains
runMode
515
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers