There was an error while loading. Please reload this page.
Computes the inverse of a quaternion, i.e. the inverse rotation.
This function is located in the pymath module. See pymath for the quaternion representation.
pymath
q_inv = pymath.invert_quat(q)
q
{x, y, z, w}
q_inv
{-x, -y, -z, w}
pymath.multiply_quat(q, q_inv)
{0, 0, 0, 1}
local q = pymath.quat_from_rotation({0, 0, 1}, 90) local q_inv = pymath.invert_quat(q) -- q_inv == {0, 0, -0.70710678, 0.70710678}
Minimum PYTHA Version: V27
pymath, pymath.multiply_quat, pymath.rotate_by_quat