This change added some extra checking of nodes to be exported and inverted between coordinate systems, and appears to work properly for Left Handed coordinate systems. Unfortunately, we detect whether or not a node is used as a coordnate system transformation via isNodeConvertingToLeftHanded() this particular line seems somewhat suspect: https://github.com/BabylonJS/Babylon.js/pull/7344/files#diff-27fc9e54be12c9c3784cf3eb48540e70R1315
In that it works when we use a left handed coordinate system, however, round tripped right handed scenes would still have an encapsulating root node, but would have an Identity transform matrix:
I'll add some additional logic to use the proper transform matrix depending on the scene handedness.
In addition, #7377 also indicates some issue with the encapsulating node used to represent punctual lights in glTF, the logic is similar, we need to prevent duplication of a light's node as well:
Discusion here:
https://forum.babylonjs.com/t/double-root-when-saving-out-glb-from-sandbox/2608
The text was updated successfully, but these errors were encountered: