# OpenGL Axis Confusion !?!?!?!?!?!?

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

## Recommended Posts

Could somone give me a quick rundown or diagram of how the axis work in OpenGL? I thought they were like this: .............-y....-z......... ..............|..../.......... ..............|.../........... ..............|../............ ..............|./............. ..-x______|/_______ x... ............./|............... ............/.|............... .........../..|............... ........../...|............... ........./....|............... ........z.....y............... (This never comes out the way i make it in the editor ><) Bah, I'm so confused by this!

##### Share on other sites
+x = right
+y = up
+z = towards you

buy a couple of books to eg the red book

##### Share on other sites
ok, so it was just my y axis that was stuffed up?

##### Share on other sites
In OpenGL you can set axis as you want; you have complete control on the axis!

However the standard notation is the 'right-hand' one: if you look at the monitor you have x going right, y up and z exiting from it

If you dont like y going up simply glScale(1,-1, 1) !

Also remember that GL stores matrices in the transposed math notation (I dont know the right term and there is always a confusion about it).
In this notation the products are to be performed in the reverse order (because the final result must be the same) so you must understand that the first operation you perform is the last you specify
Example

glTranslate()
glRotate()
glDraw()

First rotate then translate

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 29
• 16
• 11
• 10
• 11
• ### Forum Statistics

• Total Topics
634112
• Total Posts
3015585
×