diff --git a/src/components/cursor-controller.js b/src/components/cursor-controller.js index 1c3997b72d9a8a228f06109bd54ea6db8c7a6242..5a7913010c258f4dc8698c4be4aaa836f269b475 100644 --- a/src/components/cursor-controller.js +++ b/src/components/cursor-controller.js @@ -76,8 +76,8 @@ AFRAME.registerComponent("cursor-controller", { .applyQuaternion(rayObjectRotation) .normalize(); this.origin.setFromMatrixPosition(this.rayObject.matrixWorld); + this.el.setAttribute("raycaster", { origin: this.origin, direction: this.direction }); } - this.el.setAttribute("raycaster", { origin: this.origin, direction: this.direction }); const isGrabbing = this.data.cursor.components["super-hands"].state.has("grab-start"); if (isGrabbing) {