# Finding the position of sides of mesh

**URL:** <https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808>\
**Category:** Questions\
**Created:** [June 21, 2021, 2:28am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808 "2021-06-21T02:28:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Choudhary1](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Mohit\_Choudhary1](https://forum.babylonjs.com/u/Mohit_Choudhary1)\
**Post date:** [June 21, 2021, 2:28am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/1 "2021-06-21T02:28:41Z")

</div>

Hi All,  
I am doing snapping things but I am facing difficulty while doing snapping is that I am not able to find sides of mesh.  
So can anyone help me to find out sides of mesh like top,bottom,right and left sides of mesh.  
Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![msDestiny14](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/msdestiny14/32/9572_2.png) [@msDestiny14](https://forum.babylonjs.com/u/msDestiny14)\
**Post date:** [June 21, 2021, 5:50am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/2 "2021-06-21T05:50:42Z")

</div>

Hi there. Best advice I can give is showing a playground of what you are trying to do? 🙂

Other thing I found is a forum post about snapping. Not sure if this is what you are referring to. [Snap mesh on local X,Z axis of another object while moving?](https://forum.babylonjs.com/t/snap-mesh-on-local-x-z-axis-of-another-object-while-moving/4581)

---

<div class="post-metadata">

**Author:** ![ynnek](https://avatars.discourse-cdn.com/v4/letter/y/c68b51/32.png) [@ynnek](https://forum.babylonjs.com/u/ynnek)\
**Post date:** [June 21, 2021, 7:00am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/3 "2021-06-21T07:00:33Z")

</div>

Hi. How about trying to use the boundingInfo of the mesh?  
For example, `const boundingBox = someMesh.getBoundingInfo().boundingBox`

---

<div class="post-metadata">

**Author:** ![Mohit\_Choudhary1](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Mohit\_Choudhary1](https://forum.babylonjs.com/u/Mohit_Choudhary1)\
**Post date:** [June 21, 2021, 7:22am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/4 "2021-06-21T07:22:31Z")

</div>

Hi @ynnek,  
Yes I have done that I have find out topVertices of bounding box but after finding topVertices how should I be able to find out about top,bottom sides of mesh

---

<div class="post-metadata">

**Author:** ![ynnek](https://avatars.discourse-cdn.com/v4/letter/y/c68b51/32.png) [@ynnek](https://forum.babylonjs.com/u/ynnek)\
**Post date:** [June 21, 2021, 11:46am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/5 "2021-06-21T11:46:36Z")

</div>

If you mean a facet with the word ‘side’, then you can get the position of the facet by using `someMesh.getFacetPosition(facetIndex);`

---

<div class="post-metadata">

**Author:** ![Mohit\_Choudhary1](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Mohit\_Choudhary1](https://forum.babylonjs.com/u/Mohit_Choudhary1)\
**Post date:** [June 21, 2021, 11:50am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/6 "2021-06-21T11:50:05Z")

</div>

Can you please provide me some playground examples please?

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [June 22, 2021, 12:14am UTC](https://forum.babylonjs.com/t/finding-the-position-of-sides-of-mesh/21808/7 "2021-06-22T00:14:47Z")

</div>

Here’s another method that could work:

[https://playground.babylonjs.com/#DI3GL1#2](https://playground.babylonjs.com/#DI3GL1#2)

What’s happening here is:

1. You select a facet (in the case of this playground it’s manually setting the facet through code).
2. You get the normal direction of that facet
3. You compare it to the Babylon constants of Up, Down, Forward, Backward, Left, and Right.
