# How to stop HMD overriding camera position in WebVR/WebXR?

**URL:** <https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574>\
**Category:** Questions\
**Tags:** webxr, webvr, camera\
**Created:** [June 26, 2020, 10:54am UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574 "2020-06-26T10:54:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvgmiller](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rvgmiller](https://discourse.threejs.org/u/rvgmiller)\
**Post date:** [June 26, 2020, 10:54am UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/1 "2020-06-26T10:54:33Z")

</div>

Once entering WebXR, I can’t find a way to keep the camera position locked. I still need the HMD to control rotation, but is there a way to set the camera in one fixed position in xyz?

Unless I’m missing something, I don’t think just setting the camera position manually each frame works, because the HMD is able to override this.

(I’m aware a fixed camera position isn’t advised for most use-cases, but it would be good to know for unique scenarios)

Any help would be appreciated, thank you!

---

<div class="post-metadata">

**Author:** ![seanwasere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/seanwasere/32/20864_2.png) [@seanwasere](https://discourse.threejs.org/u/seanwasere)\
**Post date:** [June 26, 2020, 11:21am UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/2 "2020-06-26T11:21:31Z")

</div>

Is this because you want some kind of HUD?  
It seems strange to not want the scene camera to update when you move your head.

---

<div class="post-metadata">

**Author:** ![rvgmiller](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rvgmiller](https://discourse.threejs.org/u/rvgmiller)\
**Post date:** [June 26, 2020, 12:00pm UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/3 "2020-06-26T12:00:43Z")

</div>

I’m creating pre-rendered scenes for a tour (with stereoscopic cubemaps), but I’m using some 3D objects as hotspots that visually appear to be in the pre-rendered scene. Unfortunately the effect is only convincing if the user doesn’t move their head. As soon as they move and the camera is transformed, the illusion is broken.

---

<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:** [June 26, 2020, 12:08pm UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/4 "2020-06-26T12:08:09Z")

</div>

> [@rvgmiller](#):
>
> but is there a way to set the camera in one fixed position in xyz?

Sorry, but it’s not possible to do this unless you modify `WebXRManager.getCamera()`. And I doubt there are compelling reasons for making the camera transformation configurable with a new API.

---

<div class="post-metadata">

**Author:** ![rvgmiller](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rvgmiller](https://discourse.threejs.org/u/rvgmiller)\
**Post date:** [June 26, 2020, 12:17pm UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/5 "2020-06-26T12:17:10Z")

</div>

Fair enough, I understand it’s definitely not an intended use-case. I’ll explore some other ways to get the visual effect I’m after. A temporary fix has been moving all scene objects to match the camera transformation (but that seemed a bit overkill). Thanks for the advice.

---

<div class="post-metadata">

**Author:** ![seanwasere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/seanwasere/32/20864_2.png) [@seanwasere](https://discourse.threejs.org/u/seanwasere)\
**Post date:** [June 26, 2020, 12:55pm UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/6 "2020-06-26T12:55:40Z")

</div>

maybe the roller coaster example can give you some similar option  
[https://threejs.org/examples/webxr\_vr\_rollercoaster.html](https://threejs.org/examples/webxr_vr_rollercoaster.html)

---

<div class="post-metadata">

**Author:** ![marti.fenosa](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/marti.fenosa/32/25935_2.png) [@marti.fenosa](https://discourse.threejs.org/u/marti.fenosa)\
**Post date:** [May 2, 2022, 1:45pm UTC](https://discourse.threejs.org/t/how-to-stop-hmd-overriding-camera-position-in-webvr-webxr/16574/7 "2022-05-02T13:45:55Z")

</div>

Could you solve it some other way? Having this same issue with camera to texture.
