Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Converting from Z-up right handed to Y-up left handed coordinate system?

Started by Waaayoff Aug 14, 2018 at 10:46 AM 2 replies 11.6k views
Original Post
Waaayoff
Waaayoff

I need to transform both vertex and normals between these coordinate systems:

OpenSceneGraph: X right, Y into the page, Z up
Unity: X right, Y up, Z into the page

As far as I can tell, changing between right and left handed coordinate systems can simply be acheived by swapping two axis. For example swapping z with y should be enough.

So my questions are:

1. What about the normals? Would swapping their axis be enough?
2. If I need to rotate the model after converting the normals to the correct coordinate system, do I simply apply that rotation matrix to the normal vector, as I do to the vertex point?

"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "
Waaayoff
Waaayoff
33 minutes ago, Makusik Fedakusik said:

Yes then I was right about swapping the two axis. But what about the normals?

"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.