From b4df7cada73dc8f8b5ec6b7ea52af38fc3424100 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 18 May 2016 16:16:31 -0700 Subject: [PATCH] don't mouse-grab things through an overlay --- scripts/system/controllers/grab.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/grab.js b/scripts/system/controllers/grab.js index a7e08451bc..ef39e95880 100644 --- a/scripts/system/controllers/grab.js +++ b/scripts/system/controllers/grab.js @@ -316,7 +316,12 @@ Grabber.prototype.pressEvent = function(event) { return; } - if (event.isLeftButton!==true ||event.isRightButton===true || event.isMiddleButton===true) { + if (event.isLeftButton !== true || event.isRightButton === true || event.isMiddleButton === true) { + return; + } + + if (Overlays.getOverlayAtPoint(Reticle.position) > 0) { + // the mouse is pointing at an overlay; don't look for entities underneath the overlay. return; }