I wonder what is the reason that when z increase, the objects appear far away and when z is negative, the object is behind the camera?

  • 1
    $\begingroup$ To answer the title question: it is not. $\endgroup$ – lightxbulb Dec 9 '19 at 21:15

If you want to use the traditional x is towards right and y is up you are used to in math and physics classes. Now if you follow a right handed coordinate space, which is also commonly used. Then the direction of the z follows from the x and y direction. In this sceme positive z is pointing out from the screen.

Now you can also choose a left handed coordinate system in which case the z is reversed. Its just a matter of choosing which convention you want to use.

Likewise if you choose y to be down, ala traditional windowing math then z is reversed even if you use right hand rule.

None of these conventions are set in stone you can do whatever you want. A bit like you can choose row major or column major matrixes. You just need to know what comvention you follow.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.