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

**URL:** <https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123>\
**Category:** Questions\
**Created:** [July 3, 2021, 3:39pm UTC](https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123 "2021-07-03T15:39:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DWork](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@DWork](https://forum.babylonjs.com/u/DWork)\
**Post date:** [July 3, 2021, 3:39pm UTC](https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123/1 "2021-07-03T15:39:48Z")

</div>

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](https://playground.babylonjs.com/#ZIZR9E#3)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 4, 2021, 7:37pm UTC](https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123/2 "2021-07-04T19:37:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DWork](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@DWork](https://forum.babylonjs.com/u/DWork)\
**Post date:** [July 5, 2021, 9:21am UTC](https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123/4 "2021-07-05T09:21:35Z")

</div>

[https://playground.babylonjs.com/#ZIZR9E#3](https://playground.babylonjs.com/#ZIZR9E#3)

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [July 5, 2021, 10:24am UTC](https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123/5 "2021-07-05T10:24:10Z")

</div>

See [Parents and Children | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/mesh/transforms/parent_pivot/parent)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 5, 2021, 5:03pm UTC](https://forum.babylonjs.com/t/the-different-scaling-between-mesh-setparent-box-and-mesh-parent-box/22123/6 "2021-07-05T17:03:09Z")

</div>

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
