User Guide

559
rootNode
Syntax
member(whichCastmember).camera(whichCamera).rootNode
sprite(whichSprite).camera.rootNode
Description
3D property; allows you to get or set which objects are visible within a sprite. When a camera is
first created, it shows all nodes within the world. The rootNode property allows you to modify this
by creating a different default view that limits whats shown to a particular node and its children.
For example, light C is a child of model A., if you set the
rootNode property to
camera("defaultView").rootNode=model(A), the sprite will show only model A as illuminated by
light C. The default is
group("world"), meaning that all nodes are used.
Example
The following statement sets the rootNode of the camera of sprite 5 to the model Pluto. Only
Pluto and its children will be visible in sprite 5.
sprite(5).camera.rootNode = member("Scene").model("Pluto")
rotate
Syntax
member(whichCastmember).node(whichNode).rotate(xAngle, yAngle, \
zAngle {, relativeTo})
member(whichCastmember).node(whichNode).rotate(rotationVector \
{, relativeTo})
member(whichCastmember).node(whichNode).rotate(position, axis, \
angle {, relativeTo})
transform.rotate(xAngle, yAngle, zAngle {, relativeTo})
transform.rotate(rotationVector {, relativeTo})
transform.rotate(position, axis, angle {, relativeTo})
Description
3D command; applies a rotation after the current positional, rotational, and scale offsets held by
the node’s transform object or the directly referenced transform object. The rotation must be
specified as a set of three angles, each of which specify an angle of rotation about the three
corresponding axes. These angles may be specified explicitly in the form of
xAngle, yAngle, and
zAngle, or by a rotationVector, where the x component of the vector corresponds to the rotation
about the X axis,
y about Y axis, and z about Z axis. Alternatively, the rotation may also be
specified as a rotation about an arbitrary axis passing through a point in space. This axis is
defined in space by
position, representing a position in space and axis, representing an axis
passing through the specified position in space. The amount of rotation about this axis is
specified by
angle.
The optional
relativeTo parameter determines which coordinate system axes are used to apply the
desired rotational changes. The
relativeTo parameter can have any of the following values:
#self applies the increments relative to the node’s local coordinate system (the X, Y and Z axes
specified for the model during authoring). This value is used as the default if you use the
rotate
command with a node reference and the
relativeTo parameter is not specified.
#parent applies the increments relative to the nodes parent’s coordinate system. This value is
used as the default if you use the
rotate command with a transform reference and the
relativeTo parameter is not specified.