Model:setNodeTransform

Sets or blends the transform of a node to a new transform.


Model:setNodeTransform(index, transform, blend)

Arguments

NameTypeDefaultDescription
indexnumber The index of the node.
transformMat4 The target transform. Can also be provided as position, scale, and rotation using a mix of Vectors or numbers, with 3 scale components.
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


Model:setNodeTransform(name, transform, blend)

Arguments

NameTypeDefaultDescription
namestring The name of the node.
transformMat4 The target transform. Can also be provided as position, scale, and rotation using a mix of Vectors or numbers, with 3 scale components.
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.

See also