# StackPanel does not work in VR with Pointer events

**URL:** <https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500>\
**Category:** Bugs\
**Created:** [April 9, 2024, 1:00pm UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500 "2024-04-09T13:00:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckeiner](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ckeiner](https://forum.babylonjs.com/u/ckeiner)\
**Post date:** [April 9, 2024, 1:00pm UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500/1 "2024-04-09T13:00:38Z")

</div>

Hi all,

I have worked on a simple chat interface using a StackPanel. I’m using pointer events in order to enable scrolling inside the panel. From what I read in the [WebXR documentation](https://doc.babylonjs.com/features/featuresDeepDive/webXR/introToWebXR), it says the following:

> The most important feature that was added is the full pointer events support for the controllers. The controllers support all pointer events, so you can use [Pointer interactions](https://doc.babylonjs.com/features/featuresDeepDive/scene/interactWithScenes#pointer-interactions) just like you use to controller mouse interactions in your scene.

However, when I’m using my Oculus Quest 2 in immersive mode using my example in the playground ([https://playground.babylonjs.com/#73IZ4Q#5](https://playground.babylonjs.com/#73IZ4Q#5)), I can’t move the chat and the camera keeps moving instead.

Am I using the wrong events or is this an issue?

---

<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:** [April 9, 2024, 3:43pm UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500/2 "2024-04-09T15:43:18Z")

</div>

I’ll have to check that! 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:** [April 9, 2024, 3:43pm UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500/3 "2024-04-09T15:43:22Z")

</div>

Assigned @RaananW on April 9, 2024, 3:43pm 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:** [April 10, 2024, 3:35pm UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500/4 "2024-04-10T15:35:53Z")

</div>

Unassigned @RaananW on April 10, 2024, 3:35pm 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:** [April 10, 2024, 3:36pm UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500/5 "2024-04-10T15:36:53Z")

</div>

Here, this will work 🙂

[Simple Chat Interface | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#73IZ4Q#6)

You are using movementY of the native event, which is not supported in the way we are emulating the WebXR events. But everything can be solved directly with observables, no need to use the native event at all.

---

<div class="post-metadata">

**Author:** ![ckeiner](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ckeiner](https://forum.babylonjs.com/u/ckeiner)\
**Post date:** [April 15, 2024, 6:54am UTC](https://forum.babylonjs.com/t/stackpanel-does-not-work-in-vr-with-pointer-events/49500/6 "2024-04-15T06:54:16Z")

</div>

Works great and makes a lot of sense! Thanks a lot 🙂
