The above is equivalent to:
member("scene").model("bip01").rotate(20,20,20).
Generally
preRotate()
the camera about the point (100, 0, 0) in space, around the y axis, by 180°.
t = transform()
t.position = member("scene").camera[1].transform.position
t.preRotate(vector(100, 0, 0), vector(0, 1, 0), 180)
member("scene").camera[1].transform = t
See also
rotate
preScale()
Usage
transformReference.preScale( xScale, yScale, zScale )
transformReference.preScale( vector )
member( whichCastmember ).node.transform.preScale( xScale, \
yScale, zScale )
member( whichCastmember ).node.transform.preScale( vector )
Description
3D transform command; applies a scale prior to the existing positional, rotational, and scaling
effects of the given transform.
may be a reference to a model, group, light, or camera.
Node
Parameters
Required if applying a scale using
xScale
Required if applying a scale using
yScale
Required if applying a scale using
zScale
Required if applying a scale using a vector. Specifies the vector that contains the scale
vector
to apply.
Example
Line 1
of the following Lingo creates a duplicate of Moon1's transform. Remember that access to
a model's transform property is by reference.
Line 2
applies a scale to that transform prior to any existing positional or rotational effects of that
transform. Assume that the transform represents the positional offset and rotational orbit of
Moon1 relative to its parent planet. Lets also assume Moon2's parent is the same as Moon1's. If
we used
scale()
rotated about the planet twice as much as is Moon1. This is because the scaling would be applied
to the transform's existing positional and rotational offsets. Using
change without affecting these existing positional and rotational offsets.
Line 3
applies an additional 180° rotation about the x-axis of the planet. This will put Moon2 on
the opposite side of Moon1's orbit. Using
as Moon1, spun around its own x-axis by 180°.
472
Chapter 12: Methods
is only useful when dealing with transform variables. This line will orbit
here instead of
preScale()
-,
-, and
-axes. Specifies the scale around the
x
y
z
-,
-, and
-axes. Specifies the scale around the
x
y
z
-,
-, and
-axes. Specifies the scale around the
x
y
z
, then Moon2 would be pushed out twice as far and
would have left Moon2 in the same place
preRotate()
will apply the size
preScale()
-axis.
x
-axis.
y
-axis.
z
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