User Guide
Transforms 399
Transforms
A transform is a data object describing a model’s position, orientation, and scale in the 3D world.
Transform methods can be used to move a given vector, light, camera, or model from its current
location to a new position and/or orientation.
Transform creation method
Use the
transform() method to create a new transform data object:
Transform properties
Use these properties to work with transforms:
vector2/scalar
Returns a new vector equaling
vector2/scalar.
A new vector object
transform*
vector
Returns a new vector resulting from applying the
positional and transformation changes defined by
transform to vector. Note that vector*transform is an
invalid operation.
A new vector object
scalar-vector1
Returns a new vector equaling
scalar-vector1.
A new vector object
vector1-scalar
Returns a new vector equaling
vector1-scalar.
A new vector object
scalar + vector1
Returns a new vector equaling
scalar + vector1.
A new vector object
vector1 + scalar
Returns a new vector equaling
vector1 + scalar.
A new vector object
Method Description Returns
transform()
Creates a new transform initialized as the identity
transform. The identity transform has no rotation and a
vector position of
(0,0,0)
A new transform
object
Property Access Description Default
position
Get and set Script vector object describing the
position of a transform with the value
vector(xOffset, yOffset, zOffset). A
model.transform position represents the
model’s position in relation to its parent.
vector
(0,0,0)
scale
Get and set Script vector object describing the x, y,
and z scale of the transform with the
vector value
vector(xScale, yScale,
zScale)
.
Scaling is always applied model-
relative.
vector
(1,1,1)
Operator Description Returns