Don't allow mouse dragging the tablet in HMD mode.

This commit is contained in:
Anthony J. Thibault 2017-01-30 12:07:18 -08:00
parent 39d68828ab
commit 98b53d1d29

View file

@ -223,7 +223,6 @@ WebTablet.prototype.destroy = function () {
Overlays.deleteOverlay(this.homeButtonEntity);
HMD.displayModeChanged.disconnect(this.myOnHmdChanged);
Controller.mousePressEvent.disconnect(this.myMousePressEvent);
Controller.mouseMoveEvent.disconnect(this.myMouseMoveEvent);
Controller.mouseReleaseEvent.disconnect(this.myMouseReleaseEvent);
@ -362,7 +361,7 @@ WebTablet.prototype.mousePressEvent = function (event) {
tablet.gotoHomeScreen();
this.setHomeButtonTexture();
}
} else if (!overlayPickResults.intersects || !overlayPickResults.overlayID === this.webOverlayID) {
} else if (!HMD.active && (!overlayPickResults.intersects || !overlayPickResults.overlayID === this.webOverlayID)) {
this.dragging = true;
var invCameraXform = new Xform(Camera.orientation, Camera.position).inv();
this.initialLocalIntersectionPoint = invCameraXform.xformPoint(entityPickResults.intersection);