From 3bcc727d4745d717b83ef3baa31a3f2d4e002f90 Mon Sep 17 00:00:00 2001 From: David Back Date: Fri, 6 Jul 2018 18:57:32 -0700 Subject: [PATCH] check controller triggered in checkControllerMove --- .../system/libraries/entitySelectionTool.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index e73f8a46b8..faa65e1947 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -969,7 +969,7 @@ SelectionDisplay = (function() { if (SelectionManager.hasSelection()) { var controllerPose = getControllerWorldLocation(activeHand, true); var hand = (activeHand === Controller.Standard.LeftHand) ? 0 : 1; - if (controllerPose.valid && lastControllerPoses[hand].valid) { + if (controllerPose.valid && lastControllerPoses[hand].valid && that.triggered) { if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) || !Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) { that.mouseMoveEvent({}); @@ -1656,10 +1656,6 @@ SelectionDisplay = (function() { return (origin.y - intersection.y) / Vec3.distance(origin, intersection); }, onMove: function(event) { - if (event.x === undefined || event.y === undefined) { - return; - } - var wantDebug = false; var pickRay = generalComputePickRay(event.x, event.y); @@ -1817,10 +1813,6 @@ SelectionDisplay = (function() { pushCommandForSelections(duplicatedEntityIDs); }, onMove: function(event) { - if (event.x === undefined || event.y === undefined) { - return; - } - var pickRay = generalComputePickRay(event.x, event.y); // Use previousPickRay if new pickRay will cause resulting rayPlaneIntersection values to wrap around @@ -2071,10 +2063,6 @@ SelectionDisplay = (function() { }; var onMove = function(event) { - if (event.x === undefined || event.y === undefined) { - return; - } - var proportional = directionEnum === STRETCH_DIRECTION.ALL; var position, rotation; @@ -2408,10 +2396,6 @@ SelectionDisplay = (function() { return; } - if (event.x === undefined || event.y === undefined) { - return; - } - var wantDebug = false; if (wantDebug) { print("================== "+ getMode() + "(addHandleRotateTool onMove) -> =======================");