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

Started by
2 comments, last by Waaayoff 5 years, 8 months ago

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. "
Advertisement

you just need swap members in transform matrix

https://stackoverflow.com/questions/1263072/changing-a-matrix-from-right-handed-to-left-handed-coordinate-system

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. "

This topic is closed to new replies.

Advertisement