Model:setNodeTransform

Edit

Sets or blends the transform of a node to a new transform. This sets the local transform of the node, relative to its parent.







Arguments

NameTypeDefaultDescription
indexnumber The index of the node.
xnumber The x component of the position.
ynumber The y component of the position.
znumber The z component of the position.
sxnumber The x component of the scale.
synumber The y component of the scale.
sznumber The z component of the scale.
anglenumber The number of radians the node should be rotated around its rotation axis.
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.
blendnumber1.0 A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform.

Returns

Nothing

Arguments

NameTypeDefaultDescription
namestring The name of the node.
xnumber The x component of the position.
ynumber The y component of the position.
znumber The z component of the position.
sxnumber The x component of the scale.
synumber The y component of the scale.
sznumber The z component of the scale.
anglenumber The number of radians the node should be rotated around its rotation axis.
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.
blendnumber1.0 A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform.

Returns

Nothing

Arguments

NameTypeDefaultDescription
indexnumber The index of the node.
positionVec3 The position.
scaleVec3 The scale.
orientationQuat The orientation.
blendnumber1.0 A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform.

Returns

Nothing

Arguments

NameTypeDefaultDescription
namestring The name of the node.
positionVec3 The position.
scaleVec3 The scale.
orientationQuat The orientation.
blendnumber1.0 A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform.

Returns

Nothing

Arguments

NameTypeDefaultDescription
indexnumber The index of the node.
transformMat4 The transform.
blendnumber1.0 A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform.

Returns

Nothing

Arguments

NameTypeDefaultDescription
namestring The name of the node.
transformMat4 The transform.
blendnumber1.0 A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform.

Returns

Nothing

Notes

For best results when animating, it's recommended to keep the 3 components of the scale the same.

Even though the translation, scale, and rotation parameters are given in TSR order, they are applied in the normal TRS order.

See also