# Ground intercepting button click

**URL:** <https://forum.babylonjs.com/t/ground-intercepting-button-click/43895>\
**Category:** Questions\
**Created:** [September 6, 2023, 2:28pm UTC](https://forum.babylonjs.com/t/ground-intercepting-button-click/43895 "2023-09-06T14:28:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AR1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ar1/32/34818_2.png) [@AR1](https://forum.babylonjs.com/u/AR1)\
**Post date:** [September 6, 2023, 2:28pm UTC](https://forum.babylonjs.com/t/ground-intercepting-button-click/43895/1 "2023-09-06T14:28:07Z")

</div>

When i click on button, the ground takes the click:

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

I want buttons to be clicked.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 6, 2023, 2:34pm UTC](https://forum.babylonjs.com/t/ground-intercepting-button-click/43895/2 "2023-09-06T14:34:35Z")

</div>

Adding @carolhmj

---

<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:** [September 6, 2023, 3:48pm UTC](https://forum.babylonjs.com/t/ground-intercepting-button-click/43895/3 "2023-09-06T15:48:50Z")

</div>

It’s taking the click because you’re hooking the event listener directly to the canvas pointerdown, it doesn’t go through Babylon at all…

If you want the canvas events to be processed by Babylon, hook the listener to a scene pointer observable, like pointer pick: [groundbutton | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#SI0P20#4)

And you can set `isPointerBlock` true on the GUI controls, so clicking on a GUI element won’t propagate the click to the Babylon scene, which is what I assume you want.

---

<div class="post-metadata">

**Author:** ![AR1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ar1/32/34818_2.png) [@AR1](https://forum.babylonjs.com/u/AR1)\
**Post date:** [September 6, 2023, 4:51pm UTC](https://forum.babylonjs.com/t/ground-intercepting-button-click/43895/4 "2023-09-06T16:51:14Z")

</div>

Thanks, is there a way i can set a background image to to scrollViewer

---

<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:** [September 6, 2023, 6:57pm UTC](https://forum.babylonjs.com/t/ground-intercepting-button-click/43895/5 "2023-09-06T18:57:50Z")

</div>

You can put any GUI element inside it, so you could put an image: [groundbutton | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#SI0P20#5), you have to set its zIndex so it renders on the bottom of the buttons.
