Model:setNodeTransform
EditSets or blends the transform of a node to a new transform. This sets the local transform of the node, relative to its parent.
Arguments
Name | Type | Default | Description |
index | number | The index of the node. | |
x | number | The x component of the position. | |
y | number | The y component of the position. | |
z | number | The z component of the position. | |
sx | number | The x component of the scale. | |
sy | number | The y component of the scale. | |
sz | number | The z component of the scale. | |
angle | number | The number of radians the node should be rotated around its rotation axis. | |
ax | number | The x component of the axis of rotation. | |
ay | number | The y component of the axis of rotation. | |
az | number | The z component of the axis of rotation. | |
blend | number | 1.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
Name | Type | Default | Description |
name | string | The name of the node. | |
x | number | The x component of the position. | |
y | number | The y component of the position. | |
z | number | The z component of the position. | |
sx | number | The x component of the scale. | |
sy | number | The y component of the scale. | |
sz | number | The z component of the scale. | |
angle | number | The number of radians the node should be rotated around its rotation axis. | |
ax | number | The x component of the axis of rotation. | |
ay | number | The y component of the axis of rotation. | |
az | number | The z component of the axis of rotation. | |
blend | number | 1.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
Name | Type | Default | Description |
index | number | The index of the node. | |
position | Vec3 | The position. | |
scale | Vec3 | The scale. | |
orientation | Quat | The orientation. | |
blend | number | 1.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
Name | Type | Default | Description |
name | string | The name of the node. | |
position | Vec3 | The position. | |
scale | Vec3 | The scale. | |
orientation | Quat | The orientation. | |
blend | number | 1.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
Name | Type | Default | Description |
index | number | The index of the node. | |
transform | Mat4 | The transform. | |
blend | number | 1.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
Name | Type | Default | Description |
name | string | The name of the node. | |
transform | Mat4 | The transform. | |
blend | number | 1.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.