# Question about dynamically switching XR modes (xrweb ↔ xrhand) in a single \<a-scene\>

**URL:** <https://forum.8thwall.com/t/question-about-dynamically-switching-xr-modes-xrweb-xrhand-in-a-single-a-scene/7758>\
**Category:** Technical Support\
**Tags:** general\
**Created:** [July 24, 2025, 7:27am UTC](https://forum.8thwall.com/t/question-about-dynamically-switching-xr-modes-xrweb-xrhand-in-a-single-a-scene/7758 "2025-07-24T07:27:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chow\_kenny](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@chow\_kenny](https://forum.8thwall.com/u/chow_kenny)\
**Post date:** [July 24, 2025, 7:27am UTC](https://forum.8thwall.com/t/question-about-dynamically-switching-xr-modes-xrweb-xrhand-in-a-single-a-scene/7758/1 "2025-07-24T07:27:55Z")

</div>

**Hi 8th Wall Support Team,**

I’m currently developing an AR web experience using A-Frame and 8th Wall (Editor mode, not Studio).  
I’m trying to implement a feature where the `<a-scene>` dynamically switches between two XR modes depending on the gameplay type:

- `xrweb`: for standard surface-based AR (e.g., Gameplay 1 with a ground plane and draggable model)
- `xrhand`: for hand-tracking AR (e.g., Gameplay 2 with model fixed to palm)

Here is what I tried:

```auto
const scene = document.querySelector('a-scene')
scene.removeAttribute('xrweb')
scene.setAttribute('xrhand', '')

```

And vice versa (when returning):

```auto
scene.removeAttribute('xrhand')
scene.setAttribute('xrweb', '')

```

However, it seems that only the XR mode defined at initial page load takes effect.  
When I try to switch modes dynamically, the new mode does not seem to activate properly.

### My question is:

**Does 8th Wall support dynamic switching of XR modes (`xrweb` ↔ `xrhand`) at runtime via JS, within a single `<a-scene>`? Or must the XR mode be determined statically on first load?**

If this is not supported, is there an official recommended workaround for supporting both modes (e.g. two `<a-scene>` setups, or conditionally rendering the scene)?

Thanks so much for your support !

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [July 24, 2025, 4:01pm UTC](https://forum.8thwall.com/t/question-about-dynamically-switching-xr-modes-xrweb-xrhand-in-a-single-a-scene/7758/2 "2025-07-24T16:01:30Z")

</div>

Check out this clone-able project, It should lead you in the direction.

> **[Swap Camera (World Effects + Face Effects) | Ian Curtis | 8th Wall](https://www.8thwall.com/ian/swap-camera-face/)**
>
> Swap Camera (World Effects + Face Effects)

---

<div class="post-metadata">

**Author:** ![chow\_kenny](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@chow\_kenny](https://forum.8thwall.com/u/chow_kenny)\
**Post date:** [July 25, 2025, 1:07am UTC](https://forum.8thwall.com/t/question-about-dynamically-switching-xr-modes-xrweb-xrhand-in-a-single-a-scene/7758/3 "2025-07-25T01:07:10Z")

</div>

Dear Butlter,

Thanks for your kind help!
