# Make an overlayed scene in a viewport a pointer blocker?

**URL:** <https://forum.babylonjs.com/t/make-an-overlayed-scene-in-a-viewport-a-pointer-blocker/59674>\
**Category:** Questions\
**Created:** [July 22, 2025, 9:01pm UTC](https://forum.babylonjs.com/t/make-an-overlayed-scene-in-a-viewport-a-pointer-blocker/59674 "2025-07-22T21:01:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [July 22, 2025, 9:01pm UTC](https://forum.babylonjs.com/t/make-an-overlayed-scene-in-a-viewport-a-pointer-blocker/59674/1 "2025-07-22T21:01:22Z")

</div>

Can you make a viewport intercept the pointer events? I know its being generated from canvas coords, but would there be a way in my predicate to check if its in a viewport and if so ignore it?

I guess in the pointerEvents I have the canvas position and could manually figure it out. Just did not know if there was a more intuitive way.

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [July 22, 2025, 9:40pm UTC](https://forum.babylonjs.com/t/make-an-overlayed-scene-in-a-viewport-a-pointer-blocker/59674/2 "2025-07-22T21:40:29Z")

</div>

[Here’s a thread that discusses this a little](https://forum.babylonjs.com/t/pointerdragbehavior-with-two-second-camera-viewport/1542) (I think), but probably easier might be to create a GUI and place a rectangle over the viewport and set the rectangle.isPointerBlocker = true;

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [July 22, 2025, 10:09pm UTC](https://forum.babylonjs.com/t/make-an-overlayed-scene-in-a-viewport-a-pointer-blocker/59674/3 "2025-07-22T22:09:59Z")

</div>

I need the items in the viewport to be pickable still though. Just intercepting the picks so there is not a double interaction with the two scenes.

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [July 23, 2025, 4:22pm UTC](https://forum.babylonjs.com/t/make-an-overlayed-scene-in-a-viewport-a-pointer-blocker/59674/4 "2025-07-23T16:22:53Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#C4UTAH)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

Here is an example.

I need to make sure that when you click the sphere on a place that the plane is covered by it that the second scene “eats” the pointer interaction and prevents the first scene from registering the pointer event.

**UPDATE**

> **[Babylon.js Playground](https://playground.babylonjs.com/#C4UTAH%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

This is the only real solution I could think of, but really want something more natural.
