# x z grid confusion

This topic is 4352 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm confused with something that probably has a very simple explanation. Back in the day, studying math, everyone knows how the x and y axis look on a piece of paper, x going to the right, y going towards the top of the page, perpendicular to x. I envision the x z plane similarly. I noticed that some quads that I was culling weren't appearing properly, and although I'm not sure if this problem is related, I noticed that what I would think would be vertex (1000,0), heading to the right on a piece of paper on the x axis, actually goes toward the top of the piece of paper, along what I would think is the z axis. This is totally confusing me. something like this, with a cube translated at (1000,0): cube is here | | | | | -------------------cube should be here | | | | | so am I right to assume that the xz plane actually is: X ^ | +, + | | --------------------->Z

##### Share on other sites
          A Y          |          |          |          |          +------------>  X         /        /       /      v Z    A  Default view direction   /  /This is how the axes are defined in OpenGL.So this is what you see before any rotation/translation is done:     ^ Y     |   --+--> X     |

If you want to look at the xz plane, you should rotate your axes first, and then draw all the stuff at the wanted coordinates.

If you draw first, and then rotate the axes you get another result. In fact if you draw, then rotate and draw nothing after the rotation, the rotation had no effect on the code. My guess is that this is what went wrong. Typical translate-rotate-draw order confusion.

##### Share on other sites
thx for your response. so far all my problems have been 'typical'. I guess that is a good thing.

##### Share on other sites
You can orient the x, y, and z axis so x and y act as the ground. Then you can use them like normal 2d coordinates:
      | Z    / Y      |    /      |  /      |/________ X

• 9
• 16
• 9
• 13
• 41