-
Notifications
You must be signed in to change notification settings - Fork 298
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.look_at not as expected #708
Comments
This method was a fairly recent addition, and as you pointed out is not being used internally in pyglet (or the examples) yet. I think the intention of this method was to mimic what something like GLM produces, so for good measure we should give this a check against PyGLM. |
https://glm.g-truc.net/0.9.5/api/a00176.html#ga454fdf3163c2779eeeeeb9d75907ce97 I'm not sure if PyGLM have implemented |
It looks like they have. I did a quick comparison, and it does confirm that pyglet's implementation is off.
|
Ah nice. Definitely keeping them indentical is a good idea. |
@gizmoore This should now be fixed in master. Can you let us know how it goes? I also updated the |
This works great now, thanks for fixing so quickly. |
I started with the example/openGL
I noticed instead of using the look_at to set the view matrix, the example used:
window.view = Mat4.from_translation(Vec3(0, 0, -5))
I tried to get the same result using:
window.view = Mat4.look_at(Vec3(0, 0, -5), Vec3(0, 0, 0), Vec3(0, 1, 0))
But it didn't match. I tried some other cases and also tried comparing with Euclid Matrix4.new_look_at().transposed(). If I create simple camera positions with translate and rotate, they match the Euclid look_at matrix, but not the Mat4.look_at.
Please let me know if I have the wrong idea on how the look_at should work.
test_Mat4.zip
The text was updated successfully, but these errors were encountered: