Object exported from Blender is flipped horizontally in Babylon js

I have TV object in .gltf format that is correct when is in Blender, when I export and use it in Babylon it flipped horizontally. Take a look at the TV’s buttons, they are on the right in Blender and left in Babylon.
Blander screenshot:

Babylon screenshot:
babylonjs

And the 3D .gltf file:
tv15.zip (31.5 KB)

Adding @JCPalmer but I think I remember it comes from the handedness being different in both tools.

You could try to set scene.useRightHandedSystem to true in Babylon ???

1 Like

Yeah, useRightHandedSystem worked, Thanks.

The issue must be something else specific to your scene - in the sandbox https://sandbox.babylonjs.com/ the model looks the same it does in your blend file screenshot.

1 Like

Actually you might have reparented wrongly without keeping the root node in your scene then

This is how I parenting all parts to access them later:

var parent = new BABYLON.Mesh(obj.name, scene);
for (mesh in objArray) {
    var tempMesh = objArray[mesh];
    tempMesh.parent = parent;
    tempMesh.parentMoveToo = true;
}

Is there some thing wrong in it?

objArray is response of :

BABYLON.SceneLoader.ImportMesh("", obj.root, obj.image, scene, function (objArray) {

The first node in objArray is a special mesh with transformations to deal with right to left handedness correction. All children of this node should stay children for correct display.

Anyway, I think the first answer from @sebavan is the right one, GLTF is right handed and Babylon is left handed, if you want the same display you need to add scene.useRightHandedSystem = true.

Look at this obj file,in same code .gltf flipped and .obj not flipped I add this line:

useRightHandedSystem 

Screenshot:

Door file:
door10.zip (78.2 KB)

Now tv is correct but door not.
What shall I do?

1 Like

This is simple keep your scene left handed and do not reparent gltf without the root or dupplicate it as it is responsible for the conversion.

I really don’t know what are you talking about? I sent my code in top answers
The Answer

But now I wondering.
Every mesh I export have a few parts, that In code I unify them with a custom empty parent mesh:
var parent = new BABYLON.Mesh(obj.name, scene);
Then when I want to access their parts I use _children.

I am speaking about your code, you are changing the parent of the meshes to another one which does not follow the same properties.

by default in gltf the root node has a special setup to work in left handed scenes. by breaking this parenting the meshes will have problems to render as you d like.

Thanks, I get it, no need for .gltf parenting but .obj still need.
How to access it as one object in scene?
I move position of root part of .gltf but it will not move anything.
When I parenting them, I access them via their parent and then move parent move all parts too. It can be done by putting them in an array but whenever I want to scale, position or rotate them, I have to loop through it and it’s a little bit awkward.

Why don’t you create a parent node with the same rotation and scaling as the gltf root node and move all the meshes in the OBJ under that node? Like this:

Still no difference.
And
parent.moveWithCollisions(diff);
not known for dragging object.