Model:getNodePose
Returns the pose of a single node in the Model in a given CoordinateSpace
.
x, y, z, angle, ax, ay, az = Model:getNodePose(name, space)
Arguments
Name | Type | Default | Description |
name | string | | The name of the node.
|
space | CoordinateSpace | 'global' | Whether the pose sould be returned relative to the node's parent or relative to the root node of the Model.
|
Returns
Name | Type | Description |
x | number | The x position of the node.
|
y | number | The y position of the node.
|
z | number | The z position of the node.
|
angle | number | The number of radians the node is rotated around its rotational 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.
|
x, y, z, angle, ax, ay, az = Model:getNodePose(index, space)
Arguments
Name | Type | Default | Description |
index | number | | The node index.
|
space | CoordinateSpace | 'global' | Whether the pose sould be returned relative to the node's parent or relative to the root node of the Model.
|
Returns
Name | Type | Description |
x | number | The x position of the node.
|
y | number | The y position of the node.
|
z | number | The z position of the node.
|
angle | number | The number of radians the node is rotated around its rotational 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.
|
Notes
For skinned nodes to render correctly, use a Shader created with the animated
flag set to true
. See lovr.graphics.newShader
for more.
See also
Model:pose
Model:animate
Model:getNodeName
Model:getNodeCount
Model