# Placing mesh on another mesh

**URL:** <https://forum.babylonjs.com/t/placing-mesh-on-another-mesh/43498>\
**Category:** Questions\
**Tags:** position\
**Created:** [August 23, 2023, 8:10am UTC](https://forum.babylonjs.com/t/placing-mesh-on-another-mesh/43498 "2023-08-23T08:10:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mynkjain](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mynkjain/32/25579_2.png) [@mynkjain](https://forum.babylonjs.com/u/mynkjain)\
**Post date:** [August 23, 2023, 8:10am UTC](https://forum.babylonjs.com/t/placing-mesh-on-another-mesh/43498/1 "2023-08-23T08:10:38Z")

</div>

I have a moving mesh. Let call it Moving\_Mesh and other meshes Mesh1, Mesh2,Mesh3.

These Mesh1, Mesh2, Mesh3 have different position.y values. And Moving\_Mesh has some height H.

How do I set the value of Moving\_Mesh.position.y so that it appears properly on all these meshses (Mesh1, Mesh2, Mesh3)

Problem:- Right now when set value of Moving\_Mesh.position.y sometimes it appears to be in air for Mesh1 which have low position.y value and sometime it goes underneath for Mesh3 which have high Moving\_Mesh.position.y value. I want it to be just placed properly over mesh not in air and not underneath

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [August 23, 2023, 10:27am UTC](https://forum.babylonjs.com/t/placing-mesh-on-another-mesh/43498/2 "2023-08-23T10:27:59Z")

</div>

Are you able to reproduce your use case in the Playground?

It will be easier to understand what you want to achieve.

Without more information, I would say that setting `Moving_Mesh.position.y = Math.max(Mesh1.position.y, Mesh2.position.y, Mesh3.position.y) + H/2` should do it (assuming Moving\_Mesh is centered in its own local coordinate system).
