# How to scale the scene when using WebVR?

**URL:** <https://discourse.threejs.org/t/how-to-scale-the-scene-when-using-webvr/3780>\
**Category:** Questions\
**Tags:** webvr\
**Created:** [August 14, 2018, 12:52pm UTC](https://discourse.threejs.org/t/how-to-scale-the-scene-when-using-webvr/3780 "2018-08-14T12:52:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![makc3d](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/makc3d/32/10452_2.png) [@makc3d](https://discourse.threejs.org/u/makc3d)\
**Post date:** [August 14, 2018, 12:52pm UTC](https://discourse.threejs.org/t/how-to-scale-the-scene-when-using-webvr/3780/1 "2018-08-14T12:52:10Z")

</div>

I was just thinking, what are typical values for the eye-to-eye distance in three.js units, or how do I access the value?

The guy says vr scene appears huge to him which, I assume, means the eye-to-eye distance is too small. So I would need to apply some scale when switching to vr…? how? when? is there a guide to this?

I saw [similar previous thread](https://discourse.threejs.org/t/tweening-camera-fov-in-vr/957) but it was not helpful.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [August 14, 2018, 1:30pm UTC](https://discourse.threejs.org/t/how-to-scale-the-scene-when-using-webvr/3780/2 "2018-08-14T13:30:42Z")

</div>

Have you tried to scale the entire scene when WebVR is presenting? Something like `scene.scale.set( 0.5, 0.5, 0.5 )`;

Assuming you are using WebVR and not WebXR, you can use `renderer.vr.isPresenting()` in order to determine if the app is in VR mode.

---

<div class="post-metadata">

**Author:** ![cconsta1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/cconsta1/32/14819_2.png) [@cconsta1](https://discourse.threejs.org/u/cconsta1)\
**Post date:** [March 23, 2023, 7:08pm UTC](https://discourse.threejs.org/t/how-to-scale-the-scene-when-using-webvr/3780/3 "2023-03-23T19:08:35Z")

</div>

Hi! Thank you for this suggestion. I added an event listener to the `WebXRManager` as follows:

```javascript
this.renderer.instance.xr.addEventListener('sessionstart', this.onVRSessionStart.bind(this))
this.renderer.instance.xr.addEventListener('sessionend', this.onVRSessionEnd.bind(this))

```

I then added these functions:

```javascript
onVRSessionStart() {
    if (!this.sceneScaled) {
      console.log("xxx")

      this.scene.instance.scale.set(0.2, 0.2, 0.2)
      this.sceneScaled = true
    }
  }
  
  onVRSessionEnd() {
    if (this.sceneScaled) {
      this.scene.instance.scale.set(1, 1, 1)
      this.sceneScaled = false
    }
  }

```

And though the event listeners work (xxx) is printed, the scene is not scaled. Any help will be much appreciated. Oh, `sceneScaled = false` in the beginning. Another weird thing is that it seems like the scene is scaled, because when I did: “console.log(this.scene.instance)” the scale is indeed 0.1 but on the screen, nothing appears to be changing.

---

<div class="post-metadata">

**Author:** ![jiyinyiyong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jiyinyiyong/32/18104_2.png) [@jiyinyiyong](https://discourse.threejs.org/u/jiyinyiyong)\
**Post date:** [July 2, 2024, 7:49pm UTC](https://discourse.threejs.org/t/how-to-scale-the-scene-when-using-webvr/3780/4 "2024-07-02T19:49:55Z")

</div>

any 2024 technology for this issue?
