While making our 2D game, we were only dealing with x and y axis values. However, when you are making a 3D game, you have to deal with three axis values: x, y, and z. We're pretty much clear how our x and y axis values work by now. In a similar way, our z axis is projected on the front and back of our mobile device. The following image will explain the three axes in our 3D coordinate system better:
The positive x, y, and z axis on phone
The axes you see in the preceding image are positive directions. If you take their opposite sides, you will get negative values. The origin point starts from (0,0,0), and your values can be float values that will denote your object's location in 3D space.
Here's a classic problem that you might encounter while dealing with OpenGL in terms of device screen sizes. The grid in OpenGL assumes a screen, which is square and has a uniform coordinate system. However, if your screen size varies, then a non-square screen is considered...