everyone seems to know the camera is oriented along the -Z instead of +Z but i can't find anywhere an explanation to that arbitrary choice. Can anyone help? Thanks in advance.
Asked
Active
Viewed 118 times
2
-
2On the viewport the X-axis goes from the left to the right and the Y-axis goes from the bottom to the top. The Z-Axis is the cross product of X-axis and Y-axis. So in a right hand system the Z-axis comes out of the viewport - see [Transform the modelMatrix](https://stackoverflow.com/questions/46008171/transform-the-modelmatrix/46008573#46008573) – Rabbid76 Oct 02 '17 at 12:30
-
@Rabbid76 ...and now the question is why did they chose right-handed system and not a left-handed one? – lisyarus Oct 02 '17 at 12:40
-
1This is broad. Commonly OpenGL is right hand in view space and world space, but left hand in normalized device coordinates. Why? See [Is OpenGL coordinate system left-handed or right-handed?](https://stackoverflow.com/questions/4124041/is-opengl-coordinate-system-left-handed-or-right-handed) and [Is the OpenGL Coordinate System right-handed or left-handed?](https://stackoverflow.com/questions/5168163/is-the-opengl-coordinate-system-right-handed-or-left-handed) In fact OpenGL knows nothing about left and right. It depends on your view matrix and projection matrix – Rabbid76 Oct 02 '17 at 12:45
-
I suspect this will be opinion based, given that the decision is arbitrary, and have voted accordingly. But, for the record, the version I picked up somewhere is that it's through direct analogy with a piece of graph paper. You would expect a point on the surface of a piece of graph paper to move upward to represent positive z. So a person looking at that piece of paper from the front would see that point get closer. – Tommy Oct 02 '17 at 13:22
-
@rabbid76 i might agree with you indeed, it might seem intuitive that a translation of an object along +x moves it to the right and that a translation along +y moves it to the top, so the camera needs to look down -z for the basis to be right-handed and for the above conditions to be fullfilled – Roulbacha Oct 02 '17 at 16:41
-
An interesting discussion [in this link](https://softwareengineering.stackexchange.com/questions/17519/why-does-directx-use-a-left-handed-coordinate-system) – Ripi2 Oct 03 '17 at 18:31