Jump to content

Why is the y axis pointing up?


Recommended Posts

I've always wondered this. In most engines I've used, (blender included) the Z axis is up.

Is this a French thing? Or do more engines do this than I thought? Just wondering :D 

EDIT: And it looks like three.js is the same, but the x and z directions are different! AHHH WHY



Link to comment
Share on other sites

Having the y axis pointing up is very common in computer graphics. The default coordinate system for OpenGL and DirectX also have the Y Axis pointing up. Some Applications/Editors change it to have Z pointing up (at least they display it that way in th UI, internally it may be different).
Regarding the difference between ThreeJs and BabylonJs. ThreeJs uses a right handed coordinate system (also default in OpenGL) and BabylonJs uses a left handed coordinate system (also default in DirectX).
Since BabylonJs 2.5 you can switch to right handed also (scene.useRightHandedSystem = true).

In general if you exchange scenes/models between engines/applications you always have to check the coordinate system because they may be different. Converting between coordinate systems is usally not very difficult.

Link to comment
Share on other sites

@Kesshi Ahhh that's what I was thinking as wel!

@jerome Yeahhh ik xD For me it's really confusing because my map is built out of a 2D array, with a x and y. And to translate that, the x turns to z and the y turns to x! xD Very messy, so maybe I should just rotate the camera and make everything how I want it

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...