The different scaling between mesh.setParent(box) and mesh.parent = box

The model default scaling is Vector3(1, 1, -1), creating a box mesh as parent node, when use model.parent = box, the model scaling still “Vector3 {_isDirty: true, _x: 1, _y: 1, _z: -1}” , but use model.setParent(box), model scaling change to “Vector3 {_isDirty: true, _x: 1, _y: -1, _z: 1}”
How to recover scaling after using setParent() or keep it not change?

Here’s my PG
https://playground.babylonjs.com/#ZIZR9E#3

Would be great if you could provide a repro in the playground as I am totally unsure of what could have happened in this case.

https://playground.babylonjs.com/#ZIZR9E#3

See Parents and Children | Babylon.js Documentation

1 Like

basically setParent tries to not move the mesh in world space so it would automatically adpat rotation translation and scale to fit in where .parent keeps all the information of the mesh