# Touch input on WebXR (AR - mobile) broken?

**URL:** <https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140>\
**Category:** Bugs\
**Tags:** webxr\
**Created:** [July 4, 2023, 11:58am UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140 "2023-07-04T11:58:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gijs\_TRM](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs_trm/32/33368_2.png) [@Gijs\_TRM](https://forum.babylonjs.com/u/Gijs_TRM)\
**Post date:** [July 4, 2023, 11:58am UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/1 "2023-07-04T11:58:21Z")

</div>

Hey Everyone, I am trying to develop an AR application that lets you place your mesh on a surface, by tapping the screen, but I cannot get any kind of input to work while the AR mode is enabled.  
Furthermore I have also tried the playground demo’s listed in the WebXR/AR documentation.([WebXR Augmented Reality Features | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/webXR/webXRARFeatures))

And the ones that require input do not seem to work.  
this one for example: [Babylon.js Playground](https://playground.babylonjs.com/#KDWCZY)

These examples are straight from the babylon documentation, Is the input system broken? Am I missing something? (I am using an up-to-date Google Pixel 4 XL).

---

<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:** [July 4, 2023, 1:09pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/2 "2023-07-04T13:09:21Z")

</div>

Hello and welcome to the Babylon community!  
Pinging @RaananW

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 9:34am UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/3 "2023-07-05T09:34:51Z")

</div>

Assigned @RaananW on July 5, 2023, 9:34am UTC



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 9:35am UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/4 "2023-07-05T09:35:02Z")

</div>

i’ll check that and get back to you! thanks for reporting

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 1:22pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/5 "2023-07-05T13:22:50Z")

</div>

Can I ask what exactly doesn’t work? can you see the white ring?

---

<div class="post-metadata">

**Author:** ![Gijs\_TRM](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs_trm/32/33368_2.png) [@Gijs\_TRM](https://forum.babylonjs.com/u/Gijs_TRM)\
**Post date:** [July 5, 2023, 1:44pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/6 "2023-07-05T13:44:58Z")

</div>

Of course!  
On this url:

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

the passtrough works, but i do not see any white ring.

This URL **does** show me a white ring to be clear:

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

I take it the “placing a mesh” sandbox does work on your end?  
I have also tried it on a Galaxy fold (i do not know exactly which model) and got the same results as i got on my pixel 4 xl.

On top of that I tried several interaction implementations on forum posts about WebAR and did not get it to work. because of that, and the playground samples not working, I concluded that the AR interactions might be broken?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 1:55pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/7 "2023-07-05T13:55:32Z")

</div>

it seems like google made some changes to chrome that broke this demo (mainly the plane detection is not available anymore). I’ll need to update the demo to remove the plane-detection feature from the basic demo

---

<div class="post-metadata">

**Author:** ![Gijs\_TRM](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs_trm/32/33368_2.png) [@Gijs\_TRM](https://forum.babylonjs.com/u/Gijs_TRM)\
**Post date:** [July 5, 2023, 2:11pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/8 "2023-07-05T14:11:24Z")

</div>

Oh? so it wasn’t the Interaction that broke? Could I be so bold as to ask you to point me in the direction of a working playground-setup where I can use the touchscreen during AR to have any kind of interaction with the 3d model? Like selecting the one I tap? or placing it somewhere? I have tried several things, and at this point i am just looking for a working demo to reverse engineer.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 2:35pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/9 "2023-07-05T14:35:50Z")

</div>

So… this should work:

[Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XWBES1#473)

I am saying should because, embarrassing enough, hit-test stopped working on my test device and I have to check why. So I haven’t really tested this. However, it shows the basic concept of intercepting pointer events and using the hit-test’s current position to place an object.

---

<div class="post-metadata">

**Author:** ![Gijs\_TRM](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs_trm/32/33368_2.png) [@Gijs\_TRM](https://forum.babylonjs.com/u/Gijs_TRM)\
**Post date:** [July 5, 2023, 2:48pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/10 "2023-07-05T14:48:29Z")

</div>

Thank you very much for taking the time to set that up for me!  
however, I still get no interaction; I do get the white ring, but it does not spawn any boxes when i tap.  
(at least, that is what I’ve gathered it should do from reading the code)

does it matter where i tap? I tried tapping the donut, and the scene around it.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 2:53pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/11 "2023-07-05T14:53:00Z")

</div>

no no, that’s on me 🙂

[Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XWBES1#474)

I didn’t make the box clones visible. now it should work.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 2:53pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/12 "2023-07-05T14:53:16Z")

</div>

Unassigned @RaananW on July 5, 2023, 2:53pm UTC



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2023, 2:55pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/13 "2023-07-05T14:55:30Z")

</div>

oh, and one more thing - the plane detection demo (the first one you pasted) will only work if you enable the XR incubation flag in chrome://flags. But it should work as well.

---

<div class="post-metadata">

**Author:** ![Gijs\_TRM](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs_trm/32/33368_2.png) [@Gijs\_TRM](https://forum.babylonjs.com/u/Gijs_TRM)\
**Post date:** [July 5, 2023, 3:13pm UTC](https://forum.babylonjs.com/t/touch-input-on-webxr-ar-mobile-broken/42140/14 "2023-07-05T15:13:22Z")

</div>

Aha! thank you very much this does work!  
(Although i could’ve sworn i had that incubation flag enabled in my pixel)

edit: Just to confirm, the flag was not enabled; once i enabled it, all demos i tried did work.
