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
nodestring | number The name or index of a 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
nodestring | number The name or index of a node.
positionvector The position.
scalevector The scale.
orientationquaternion 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
nodestring | number The name or index of a 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