Convert scene from right to left

I have a problem where I have a rather complex scene in an left handed coordinate system. I need to export the hole scene as a GLB and due to a bug (GLB Export fails), I need to create a new scene which is right handed. My models are children to one or more transform node.

I have create this PG to illustrate the issue. It’s possible to swap between the right handed scene with key 1 and left handed scene key 2:

I have collected all nodes from the right handed scene under a transform node “RootTransform” with an inverted z scale. This looks good except one of my glb imports (green arrow) - points in the opposite direction along the x-axis. The blue arrow could have the same problem but is hidden by symmetry.

This suggests I need to invert the x axis too for imported models?
But then there is not a consistency between imported models and created meshes?

Am I missing something imported here?
What is the correct transformation of the “RootTransform”, which transforms the scene from right to left?

I think you might be facing a bug due to the assignment of the root node to one of the “green arrows”. It seems like the green arrow model has a rotation that gets applied to it.

When I force both “green arrows” to have rotation = (0, 0, 0) they both look the same.

glTF Loader Demo | Babylon.js Playground (babylonjs.com)

1 Like