# Not able to reset camera position in WebXR

**URL:** <https://discourse.threejs.org/t/not-able-to-reset-camera-position-in-webxr/23026>\
**Category:** Questions\
**Tags:** webxr, perspective-camera, camera\
**Created:** [February 1, 2021, 6:51am UTC](https://discourse.threejs.org/t/not-able-to-reset-camera-position-in-webxr/23026 "2021-02-01T06:51:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivas\_Prabhu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/srinivas_prabhu/32/12002_2.png) [@Srinivas\_Prabhu](https://discourse.threejs.org/u/Srinivas_Prabhu)\
**Post date:** [February 1, 2021, 6:51am UTC](https://discourse.threejs.org/t/not-able-to-reset-camera-position-in-webxr/23026/1 "2021-02-01T06:51:32Z")

</div>

Hi All,

I have been creating a WebXR based Virtual reality application where the user just moves around a simple scene and just interacts with different objects. I am using Oculus Rift S for testing.

I have been facing this precision issue, where when I try to reset the camera back to the original position the position seems to be slightly off. Each time I reset the camera, the camera is pretty close to the original position but not quite there.

This is what I do: I have added a camera group so that it helps me changing camera position during teleportation:

```
 this.camera = new PerspectiveCamera(fov, el.clientWidth / el.clientHeight, 0.1, 1000);
 //Set initial position
 this.camera.position.set(0,1.6,0);
 this.scene.add(this.camera);

 //Add group for teleportation help
  this.cameraGroup = new Group();
  this.cameraGroup.add(this.camera);
  this.scene.add(this.cameraGroup);

```

To reset back to the original position I do this:

```
 //Set the camera back to the original position
 this.camera.position.set(0,1.6,0);
 this.cameraGroup.position.set(0.0,0.0,0.0);

```

Although this does reset back the XR camera back very close to the original position the camera is always half a meter or so off.

What could be happening here? Any help regarding this would be invaluable.

Regards  
Srinivas

---

<div class="post-metadata">

**Author:** ![Srinivas\_Prabhu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/srinivas_prabhu/32/12002_2.png) [@Srinivas\_Prabhu](https://discourse.threejs.org/u/Srinivas_Prabhu)\
**Post date:** [February 1, 2021, 10:40am UTC](https://discourse.threejs.org/t/not-able-to-reset-camera-position-in-webxr/23026/2 "2021-02-01T10:40:21Z")

</div>

Hi,

Any help regarding this will be appreciated. Also, if you need more info I’ll be happy to assist

Thanks

---

<div class="post-metadata">

**Author:** ![felixmariotto](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/felixmariotto/32/5928_2.png) [@felixmariotto](https://discourse.threejs.org/u/felixmariotto)\
**Post date:** [February 1, 2021, 2:15pm UTC](https://discourse.threejs.org/t/not-able-to-reset-camera-position-in-webxr/23026/3 "2021-02-01T14:15:51Z")

</div>

Hi, you should not move the camera directly in VR, put the camera in a Group and move the Group.

---

<div class="post-metadata">

**Author:** ![Srinivas\_Prabhu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/srinivas_prabhu/32/12002_2.png) [@Srinivas\_Prabhu](https://discourse.threejs.org/u/Srinivas_Prabhu)\
**Post date:** [February 1, 2021, 3:38pm UTC](https://discourse.threejs.org/t/not-able-to-reset-camera-position-in-webxr/23026/4 "2021-02-01T15:38:30Z")

</div>

Hi @felixmariotto

Yes, thats what I am doing at the moment.

Anyways, I found out that this was a bug in my application code and precision error happened due to this bug which I got fixed.

Thanks for the reply anyways. I appreciate it.

Thanks  
Srinivas
