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

Utility function gl_to_px_tf_ref is broken for non-unity scale #104

Closed
hrydgard opened this issue Nov 12, 2020 · 0 comments
Closed

Utility function gl_to_px_tf_ref is broken for non-unity scale #104

hrydgard opened this issue Nov 12, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@hrydgard
Copy link
Contributor

hrydgard commented Nov 12, 2020

I'll fix this myself later, just a reminder.

gl_to_px_tf_ref doesn't work if there's any scale, rotation breaks. Something like this works better (still drops scale of course, but rotation works fine)

pub fn mat4_to_pose_px(mat: &Mat4) -> PxTransform {
    let (_scale, rot, pos) = mat.to_scale_rotation_translation();
    vec3_quat_to_px(pos, rot)
}
@hrydgard hrydgard added the bug Something isn't working label Nov 12, 2020
@hrydgard hrydgard changed the title Utility function gl_to_px_tf_ref is broken Utility function gl_to_px_tf_ref is broken for non-unity scale Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants