diff --git a/src/components/snap-rotation.js b/src/components/snap-rotation.js index 5836a55965601d1aa05f700196c6ad95e75b2e28..d0de335a4cdf57c54d78dac288a740f1c09d3c6d 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 + }); } });