Is there any way to get Zooming in and out functionality using the property of PerspectiveCamera.zoom?
After several attempts I got this working code inside the render function and XRSession started:
if (this.camera.zoom !== 1) {
const arrCameras = this.renderer.xr.getCamera();
arrCameras.cameras[0].fov = this.fov; // default set to 80
arrCameras.cameras[1].fov = this.fov; // default set to 80
arrCameras.cameras[0].aspect = this.aspect; // default set to .88
arrCameras.cameras[1].aspect = this.aspect; // default set to .88
arrCameras.cameras[0].zoom = this.camera.zoom; // camera zoom is been modified using controller gamepad
arrCameras.cameras[1].zoom = this.camera.zoom; // camera zoom is been modified using controller gamepad
arrCameras.cameras[0].updateProjectionMatrix();
arrCameras.cameras[1].updateProjectionMatrix();
}
this functionality should be used in 360° Equirectangular Panoramas, I 'm not trying to move the camera, I am just trying to get zoom feature for this 360° Equirectangular Panoramas.
the code worked, it does the zoom, but the distance between eyes is wrong.