Hi guys,

I am learning Godot and thanks for this amazing software! I was asking myself a simple question : why is the Y axis used as up vector in Godot?

Since I come from the Blender world and other softwares (Rhinoceros, UE4), it's kind of confusing when it comes to programming movement and rotations.

I saw that 3d softwares don't use the same conventions for world coordinates and vector naming but why is that?

Thanks

Using Y as up is pretty popular for 3D engines, it's not just Godot. I mean, it is sort of arbitrary, and some engines do it different, but the popular convention for stuff like OpenGL, DirectX, Vulkan, etc. is to have Y up (but as I said, it can be anything, and even with Y up there are left and right-handed coordinate spaces which confuse things further). I think Blender does something different and it is infinitely confusing to me, every time, since I am accustomed to Y up.

In a sense it all starts with a screen/camera, in that sense blender isn't that different either since a camera object in blender does actually have its local Z axis as it's depth axis.

Yeah cybereality is right. I personally hate Y==up , but if I remember correctly, it all started with the 3dsMax software, so blame it, 20 years ago. 3dsmax exported .obj files, and the obj's all have Y == up. so game engines decided to follow their lead.

I asked the same question a while ago the reason y-up bothers me is that when I want a 2d coordinate for my 3d game it's always xy and maps to xz. In order to maintain my sanity I ended up making my own 2d vector classes using xz coordinates.

From my research it doesn't seem possible to change the game world to use z-up. So I don't think it's so arbitrary as people think, otherwise it might be easy to toggle with an option in settings.

Well, yeah, you have to work with the tools you have and what is an option in modelling packages or game engines. I'm sure there is a good reason, I didn't think about 3ds max, but it is a popular convention for sure. I know for 2D, the X and Y were modeled after the cathode-ray guns in old TVs the way they would scan the image (except for 2D, Y is down).

@cybereality said: Well, yeah, you have to work with the tools you have and what is an option in modelling packages or game engines. I'm sure there is a good reason, I didn't think about 3ds max, but it is a popular convention for sure. I know for 2D, the X and Y were modeled after the cathode-ray guns in old TVs the way they would scan the image (except for 2D, Y is down).

Great point, That's probably the justification 3dsMax used!

The Y axis actually is up. Imagine you are looking at a painting (or 2D viewport), axis are X as Wide and Y as Up/Down. Z corresponds to the depth.

Imagine living on a planet, imagine for a second that the planet is made of a sphere, what axis is up if you were to stand on the surface of that planetoid? vertex normal is Z, what?

Nah it really is arbitrary, the industry has for the most part settled on y-up. But it is purely arbitrary.

Well thanks for your answers, i'll stick to this convention even if it makes less sense ;)

@johhnry said: I was asking myself a simple question : why is the Y axis used as up vector in Godot?

3D space is an extension of 2D space. In 2D, we work with X horizontal and Y vertical. And when you extend into 3D space, Y remains as the up direction because we look out across the world, not down onto it.

Where the camera is is arbitrary, many games are top down. So many of you guys keep saying y is vertical like it's just so. But the camera can be anywhere.

And some 2D "top-down" games might be implemented from an angled viewpoint so as to make the "up" axis be aligned with the front/back axis so that they are both along screen Y.

In my 3d top down game, I considered rotating the entire game such that xy was the map. Just because logistically that makes sense. But I chickened out because I don't know enough about the engine to be able to say for sure that won't have strange effects.

I'm not sure for example if rag dolls would fly sideways or anything like that. But I remember I really wanted xy to be the plain.

6 days later

@jbrooks79 said: Actually, it's probably because in a 2D game, the x-axis is side-ways, and y-axis is up . . So, when they added a 3rd dimension, it was natural . . it goes into the screen, an expansion of 2D world, to 3D . . :)

Exactly. Well said.