Model:getNodeTransform

Returns the transform (position, scale, and rotation) of a node.


x, y, z, sx, sy, sz, angle, ax, ay, az = Model:getNodeTransform(index, origin)

Arguments

NameTypeDefaultDescription
indexnumber The index of a node.
originOriginType'root' Whether the transform should be returned relative to the root node or the node's parent.

Returns

NameTypeDescription
xnumber The x position of the node.
ynumber The y position of the node.
znumber The z position of the node.
sxnumber The x scale of the node.
synumber The y scale of the node.
sznumber The z scale of the node.
anglenumber The number of radians the node is rotated around its axis of rotation.
axnumber The x component of the axis of rotation.
aynumber The y component of the axis of rotation.
aznumber The z component of the axis of rotation.

x, y, z, sx, sy, sz, angle, ax, ay, az = Model:getNodeTransform(name, origin)

Arguments

NameTypeDefaultDescription
namestring The name of a node.
originOriginType'root' Whether the transform should be returned relative to the root node or the node's parent.

Returns

NameTypeDescription
xnumber The x position of the node.
ynumber The y position of the node.
znumber The z position of the node.
sxnumber The x scale of the node.
synumber The y scale of the node.
sznumber The z scale of the node.
anglenumber The number of radians the node is rotated around its axis of rotation.
axnumber The x component of the axis of rotation.
aynumber The y component of the axis of rotation.
aznumber The z component of the axis of rotation.

See also