# How to disable OnPointerOverTrigger triggering meshes that are behind another one?

**URL:** <https://forum.babylonjs.com/t/how-to-disable-onpointerovertrigger-triggering-meshes-that-are-behind-another-one/5498>\
**Category:** Questions\
**Created:** [September 6, 2019, 11:47am UTC](https://forum.babylonjs.com/t/how-to-disable-onpointerovertrigger-triggering-meshes-that-are-behind-another-one/5498 "2019-09-06T11:47:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![issabln](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@issabln](https://forum.babylonjs.com/u/issabln)\
**Post date:** [September 6, 2019, 11:47am UTC](https://forum.babylonjs.com/t/how-to-disable-onpointerovertrigger-triggering-meshes-that-are-behind-another-one/5498/1 "2019-09-06T11:47:42Z")

</div>

As it states in the title: how can I do that?

Here a PG, I got 2 boxes to which an actionManager is attached, I’ve set the camera in the right position so you’ll see the unwanted effect quickly

[https://playground.babylonjs.com/#RMZC85#5](https://playground.babylonjs.com/#RMZC85#5)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 6, 2019, 2:52pm UTC](https://forum.babylonjs.com/t/how-to-disable-onpointerovertrigger-triggering-meshes-that-are-behind-another-one/5498/2 "2019-09-06T14:52:48Z")

</div>

Hello!

I would recommend to simplify the repro because there are too many not required info 🙂

I’m not sure to understand what is the problem with that PG

---

<div class="post-metadata">

**Author:** ![Devin\_Wright](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/devin_wright/32/4302_2.png) [@Devin\_Wright](https://forum.babylonjs.com/u/Devin_Wright)\
**Post date:** [September 6, 2019, 3:43pm UTC](https://forum.babylonjs.com/t/how-to-disable-onpointerovertrigger-triggering-meshes-that-are-behind-another-one/5498/3 "2019-09-06T15:43:16Z")

</div>

I think this sort of gets you there.  
[https://playground.babylonjs.com/#RMZC85#6](https://playground.babylonjs.com/#RMZC85#6)

Looks like `scene.meshUnderPointer` does not take in to account if there is another mesh in the way.

What I did was just do a simple `scene.pick` at where the mouse is currently at and check to see if the hit mesh is what is currently under the cursor. There are likely better ways to do this though.
