# How to know whether a mesh is occluded by a specific mesh?

**URL:** <https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936>\
**Category:** Questions\
**Tags:** mesh, occlusion\
**Created:** [November 23, 2022, 6:52am UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936 "2022-11-23T06:52:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunpowderfans](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gunpowderfans/32/37986_2.png) [@gunpowderfans](https://forum.babylonjs.com/u/gunpowderfans)\
**Post date:** [November 23, 2022, 6:52am UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936/1 "2022-11-23T06:52:18Z")

</div>

Meshes has “isOccluded” property. But how to detect whether a specific mesh occluded it?

---

<div class="post-metadata">

**Author:** ![Takemura](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/takemura/32/25836_2.png) [@Takemura](https://forum.babylonjs.com/u/Takemura)\
**Post date:** [November 23, 2022, 7:00am UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936/2 "2022-11-23T07:00:14Z")

</div>

Hey gunpowderfan,

maybe this article can help you out:

> [@Mesh occluded or not?](https://forum.babylonjs.com/t/mesh-occluded-or-not/15545/2):
>
> The best answer is probably this one:

---

<div class="post-metadata">

**Author:** ![gunpowderfans](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gunpowderfans/32/37986_2.png) [@gunpowderfans](https://forum.babylonjs.com/u/gunpowderfans)\
**Post date:** [November 23, 2022, 7:10am UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936/3 "2022-11-23T07:10:00Z")

</div>

Thanks for reply, but this one doesn’t answer my question ☹  
For example, if there’s a ball behind 2 walls, I just wanna know whether the ball is occluded by one of the walls

---

<div class="post-metadata">

**Author:** ![Takemura](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/takemura/32/25836_2.png) [@Takemura](https://forum.babylonjs.com/u/Takemura)\
**Post date:** [November 23, 2022, 7:34am UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936/4 "2022-11-23T07:34:58Z")

</div>

Not sure if I get it right, but can’t you launch ray after isOccluded is true to determine the mesh (wall)?

> **[Mesh Picking | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/mesh/interactions/picking_collisions)**
>
> Learn how to pick meshes in Babylon.js.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [December 22, 2022, 5:54pm UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936/5 "2022-12-22T17:54:49Z")

</div>

Hello @gunpowderfans just checking in, do you still need help with this?

---

<div class="post-metadata">

**Author:** ![gunpowderfans](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gunpowderfans/32/37986_2.png) [@gunpowderfans](https://forum.babylonjs.com/u/gunpowderfans)\
**Post date:** [December 23, 2022, 2:56am UTC](https://forum.babylonjs.com/t/how-to-know-whether-a-mesh-is-occluded-by-a-specific-mesh/35936/6 "2022-12-23T02:56:35Z")

</div>

My problem wasn’t solved but I don’t need help with this for now. I figured a way to prevent using this feature in weeks ago
