Model:pose

Applies a pose to a single node of the Model. The input pose is assumed to be relative to the pose of the node's parent. This is useful for applying inverse kinematics (IK) to a chain of bones in a skeleton.

The alpha parameter can be used to mix between the node's current pose and the input pose.

Model:pose(name, x, y, z, angle, ax, ay, az, alpha)

Arguments

NameTypeDefaultDescription
namestringThe name of the node.
xnumberThe x position.
ynumberThe y position.
znumberThe z position.
anglenumberThe angle of the orientation.
axnumberThe x component of the rotation axis.
aynumberThe y component of the rotation axis.
aznumberThe z component of the rotation axis.
alphanumber1How much of the pose to mix in, from 0 to 1.

Returns

Nothing


Model:pose(index, x, y, z, angle, ax, ay, az, alpha)

Arguments

NameTypeDefaultDescription
indexnumberThe node index.
xnumberThe x position.
ynumberThe y position.
znumberThe z position.
anglenumberThe angle of the orientation.
axnumberThe x component of the rotation axis.
aynumberThe y component of the rotation axis.
aznumberThe z component of the rotation axis.
alphanumber1How much of the pose to mix in, from 0 to 1.

Returns

Nothing


Clear the pose of the Model.

Model:pose()

Arguments

None

Returns

Nothing

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