From d3e801ac435b50481372f84b84e582b8e0f28f0d Mon Sep 17 00:00:00 2001 From: netpro2k <netpro2k@gmail.com> Date: Thu, 5 Oct 2017 15:52:08 -0700 Subject: [PATCH] Hacky fix for ratchet turning not networking --- src/components/snap-rotation.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/snap-rotation.js b/src/components/snap-rotation.js index 5836a5596..d0de335a4 100644 --- a/src/components/snap-rotation.js +++ b/src/components/snap-rotation.js @@ -58,5 +58,12 @@ AFRAME.registerComponent("snap-rotation", { } else if (e.type === rightEvent || (rightKey && e.key === rightKey)) { obj.rotateOnAxis(rotationAxis, -rotationDegres * THREE.Math.DEG2RAD); } + + // @TODO this is really ugly, can't just set the rotation directly or it wont network + this.el.setAttribute("rotation", { + x: obj.rotation.x * THREE.Math.RAD2DEG, + y: obj.rotation.y * THREE.Math.RAD2DEG, + z: obj.rotation.z * THREE.Math.RAD2DEG + }); } }); -- GitLab