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

NameTypeDefaultDescription
namestringThe name of the node.
spaceCoordinateSpaceglobalWhether the pose sould be returned relative to the node's parent or relative to the root node of the Model.

Returns

NameTypeDescription
xnumberThe x position of the node.
ynumberThe y position of the node.
znumberThe z position of the node.
anglenumberThe number of radians the node is rotated around its rotational axis.
axnumberThe x component of the axis of rotation.
aynumberThe y component of the axis of rotation.
aznumberThe z component of the axis of rotation.

x, y, z, angle, ax, ay, az = Model:getNodePose(index, space)

Arguments

NameTypeDefaultDescription
indexnumberThe node index.
spaceCoordinateSpaceglobalWhether the pose sould be returned relative to the node's parent or relative to the root node of the Model.

Returns

NameTypeDescription
xnumberThe x position of the node.
ynumberThe y position of the node.
znumberThe z position of the node.
anglenumberThe number of radians the node is rotated around its rotational axis.
axnumberThe x component of the axis of rotation.
aynumberThe y component of the axis of rotation.
aznumberThe 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