forked from icaven/glm
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug in glm::decompose #448
Comments
i believe the last part in the function that gets the quaternion is kinda wrong
|
This issue was fixed using @volcoma resolution in master branch for GLM 0.9.9 release. This feature barely has unit tests so it would be better than one of you have a look. Thanks for contributing, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Please try this:
glm::mat4 rotationMat = glm::yawPitchRoll(0, glm::radians(-90), 0);
glm::vec3 translate, scale, skew;
glm::vec4 perspective;
glm::quat WRONG_QUAT;
glm::decompose(rotationMat, scale, WRONG_QUAT, translate, skew, perspective);
I will get WRONG_QUAT = {x=0.707106769 y=-0.000000000 z=0.000000000 w=0.707106769}
While I think the right result is
{x=-0.707106769 y=-0.000000000 z=0.000000000 w=0.707106769}
Am I right ? is it a bug?
Regards
The text was updated successfully, but these errors were encountered: