Skip to content
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

Mat4 get rotation does not give a valid quaternion when mat4 is scaled (also quat2.fromMat4 issue) #434

Open
signorpipo opened this issue Jul 18, 2021 · 0 comments

Comments

@signorpipo
Copy link

If u set the mat4 with a quaternion rotation, scale the mat4 and then call getRotation, u won't get the initial rotation, and normalize that result won't get it either.
U need to scale it back to 1 and call getRotation if u want the rotation u put in.

This also means quat2.fromMat4 does not work if the matrix4 has a scale. This at least in the environment I work with, where the scale is not saved into the quat2 transform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant