# Change position of the child mesh

**URL:** <https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841>\
**Category:** Questions\
**Created:** [March 28, 2022, 8:31pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841 "2022-03-28T20:31:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pigga](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@pigga](https://forum.babylonjs.com/u/pigga)\
**Post date:** [March 28, 2022, 8:31pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841/1 "2022-03-28T20:31:20Z")

</div>

I use mesh.setParent [Mesh | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/typedoc/classes/babylon.mesh#setparent) to make the child mesh move position and rotation with the parent mesh.

Playground example:  
Before the mesh generated, the animation has stopped, is there any way to make the mesh be attached to the box (be on the same position)

Examples | Babylon.js Playground ([babylonjs.com](http://babylonjs.com))]([https://playground.babylonjs.com/#7V0Y1I#1627](https://playground.babylonjs.com/#7V0Y1I#1627))

---

<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:** [March 28, 2022, 8:36pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841/2 "2022-03-28T20:36:49Z")

</div>

use .parent = instead of setParent() this way the current position won t be impacted.

---

<div class="post-metadata">

**Author:** ![pigga](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@pigga](https://forum.babylonjs.com/u/pigga)\
**Post date:** [March 28, 2022, 8:41pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841/3 "2022-03-28T20:41:12Z")

</div>

I just tried, it is still the same problem, I need one mesh always be attached with another mesh

---

<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:** [March 28, 2022, 8:48pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841/4 "2022-03-28T20:48:05Z")

</div>

Can you repro in the playground ? I am not sure to understand your issue

---

<div class="post-metadata">

**Author:** ![pigga](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@pigga](https://forum.babylonjs.com/u/pigga)\
**Post date:** [March 28, 2022, 9:20pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841/5 "2022-03-28T21:20:12Z")

</div>

I updated a very simple playground example, hope it helps to better understand

---

<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:** [March 28, 2022, 9:49pm UTC](https://forum.babylonjs.com/t/change-position-of-the-child-mesh/28841/6 "2022-03-28T21:49:49Z")

</div>

Not sure what you expect to happen, this seems to be what you want [https://playground.babylonjs.com/#7V0Y1I#1629](https://playground.babylonjs.com/#7V0Y1I#1629)
