diff --git a/index.html b/index.html index 3547182..b07e75d 100644 --- a/index.html +++ b/index.html @@ -7,17 +7,16 @@ - - - - - - - - - - - + + + + + + + + + + @@ -40,7 +39,7 @@ - + - + @@ -141,7 +140,7 @@ - + @@ -221,6 +220,7 @@ > + @@ -247,9 +247,6 @@

Settings

const type = detail.value; movementType = type; if (type === 'move') { - - // Hack fix for when the camera rig is rotated. - cameraRig.object3D.rotation.y = 0; cameraRig.setAttribute('movement-controls', 'enabled', true); for (const p of rayPointers) p.removeAttribute('mixin'); } diff --git a/main.js b/main.js index 616a400..9867bf7 100644 --- a/main.js +++ b/main.js @@ -59,8 +59,7 @@ AFRAME.registerComponent("xr-follow", { }, tick() { const scene = this.el.sceneEl; - const cameraObject = scene.camera; - const camera = scene.is('vr-mode') ? scene.renderer.xr.getCamera(cameraObject) : cameraObject; + const camera = scene.camera; const object3D = this.el.object3D; camera.getWorldPosition(object3D.position); object3D.parent.worldToLocal(object3D.position);