I’ve encountered an issue that I can’t solve, and I hope for your help. When I load GLB (gltf with binary data) models into Babylon.js using the SceneLoader.ImportMeshAsync method, I notice that all meshes are inverted, and the textures are mirrored.
Interestingly, when I load the same models with the same textures using any other editors, everything displays correctly. The problem only occurs when using SceneLoader.ImportMeshAsync in Babylon.js.
I’ve made sure that the issue is not related to the settings of the models or textures, as they work correctly in other environments. Perhaps the problem is related to how Babylon.js processes coordinates or material settings.
I would like to hear from you if anyone else has encountered this issue? And perhaps someone can share a solution or a hint on how to fix this problem?
I would appreciate any help and advice!
Thank you!
Upd.:
I am sorry. I found the problem. It was because of my scaling settings.
Any such scaling turns the model inside out. It helps:
mesh.scaling = new BABYLON.Vector3(-100, -100, -100);
mesh.rotation = new BABYLON.Vector3( 0, 0, Math.PI);
But maybe there is some more elegant way?