From 3ba9de73d01cd72daa4ba9423a4ea4d873461a59 Mon Sep 17 00:00:00 2001
From: Robert Long <robert@robertlong.me>
Date: Thu, 3 May 2018 18:02:29 -0700
Subject: [PATCH] getWorldRotation -> getWorldQuaternion

---
 src/components/offset-relative-to.js | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/components/offset-relative-to.js b/src/components/offset-relative-to.js
index f940b6872..393610224 100644
--- a/src/components/offset-relative-to.js
+++ b/src/components/offset-relative-to.js
@@ -18,12 +18,6 @@ AFRAME.registerComponent("offset-relative-to", {
     const offsetVector = new THREE.Vector3().copy(this.data.offset);
     this.data.target.object3D.localToWorld(offsetVector);
     this.el.setAttribute("position", offsetVector);
-
-    const headWorldRotation = this.data.target.object3D.getWorldRotation();
-    this.el.setAttribute("rotation", {
-      x: headWorldRotation.x * THREE.Math.RAD2DEG,
-      y: headWorldRotation.y * THREE.Math.RAD2DEG,
-      z: headWorldRotation.z * THREE.Math.RAD2DEG
-    });
+    this.data.target.object3D.getWorldQuaternion(this.el.object3D.quaternion);
   }
 });
-- 
GitLab