From 5f27c69073cffda6630815b031912730da772be9 Mon Sep 17 00:00:00 2001 From: johnshaughnessy <johnfshaughnessy@gmail.com> Date: Tue, 30 Oct 2018 14:03:56 -0700 Subject: [PATCH] Always provide cursor pose from app-aware-mouse --- src/systems/userinput/devices/app-aware-mouse.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/systems/userinput/devices/app-aware-mouse.js b/src/systems/userinput/devices/app-aware-mouse.js index 4afd124e7..66e006d44 100644 --- a/src/systems/userinput/devices/app-aware-mouse.js +++ b/src/systems/userinput/devices/app-aware-mouse.js @@ -30,13 +30,6 @@ export class AppAwareMouseDevice { this.camera = document.querySelector("#player-camera").components.camera.camera; } - const coords = frame[paths.device.mouse.coords]; - const isCursorGrabbing = this.cursorController.data.cursor.components["super-hands"].state.has("grab-start"); - if (isCursorGrabbing) { - frame[paths.device.smartMouse.cursorPose] = calculateCursorPose(this.camera, coords); - return; - } - const buttonLeft = frame[paths.device.mouse.buttonLeft]; if (buttonLeft && !this.prevButtonLeft) { const rawIntersections = []; @@ -54,8 +47,9 @@ export class AppAwareMouseDevice { if (!this.clickedOnAnything && buttonLeft) { frame[paths.device.smartMouse.cameraDelta] = frame[paths.device.mouse.movementXY]; - } else { - frame[paths.device.smartMouse.cursorPose] = calculateCursorPose(this.camera, coords); } + + const coords = frame[paths.device.mouse.coords]; + frame[paths.device.smartMouse.cursorPose] = calculateCursorPose(this.camera, coords); } } -- GitLab