ImportMesh Orientation

Hello!

I’m trying to understand how I should import stl files to get them oriented as intended. As is they always end up “mirrored” (Y and Z swapped).

Importing a .glb behaves as expected, but when importing an .stl, the Y and Z axes are swapped. This is the case for both left and right handed coordinate systems. I could manually swap all the YZ points, but I really feel like I’m missing something.

I created this playground that imports the same coordinate axes mesh from a glb, and an stl.
https://playground.babylonjs.com/#9SQ4TX#4

Any help/insight would be appreciated!

Cheers,
Chris

Playground FYI:
At the top of the file: scene.useRightHandedSystem = true;

I added blocks to my imported axes so they could still be distinguished without color. X: 1 block, Y: 2 blocks, Z: 3 blocks

Hi @Crispy and welcome to the forum. There is an extensive discussion on this here Permanently change set of axes which you might be interested in.

1 Like

Thank you, that’s exactly it!
I’m glad it’s not just me :slight_smile: