Coordinates - server XYZ to client XZY

Hi all,

My server streams coordinates to the client, expressed in an XYZ (z-up) coordinates system. Think 2d (X,Y) cartesian with Z for depth.

What is the operation to be done client-side so that Babylon can display the correct data in its Y-up coordinate system?

I think (but not 100% certain) that both systems are left handed.

Is it:
. simple matter to flip Z and Y? as in:
server(x,y,z) → client(x,z,y)
. or also multiplying the final client-side component by -1? as in:
server(x,y,z) → client(x,z,-y)


If both are left handed, you need to flip Z/Y and invert the sign

And if the server is right handed, you only flip:

(EDIT: corrected)

Actually you got it reversed @carolhmj, in your first drawing the coordinate system on the server is rhs while it is lhs on the second one :wink:

Oh, dang, I flipped my own left and right, thanks for the correction! :rofl: I edited the post

tyvm guys!