show hand lasers when edit is enabled, but not if there are not hand-controllers

This commit is contained in:
Seth Alves 2017-04-28 10:24:04 -07:00
parent 2a0fc5b34c
commit 4b0e7ceef5

View file

@ -1801,15 +1801,15 @@ function MyController(hand) {
} }
this.processStylus(); this.processStylus();
if (isInEditMode() && !this.isNearStylusTarget) { if (isInEditMode() && !this.isNearStylusTarget && HMD.isHandControllerAvailable()) {
// Always showing lasers while in edit mode and hands/stylus is not active. // Always showing lasers while in edit mode and hands/stylus is not active.
var rayPickInfo = this.calcRayPickInfo(this.hand); var rayPickInfo = this.calcRayPickInfo(this.hand);
this.intersectionDistance = (rayPickInfo.entityID || rayPickInfo.overlayID) ? rayPickInfo.distance : 0; this.intersectionDistance = (rayPickInfo.entityID || rayPickInfo.overlayID) ? rayPickInfo.distance : 0;
this.searchIndicatorOn(rayPickInfo.searchRay); this.searchIndicatorOn(rayPickInfo.searchRay);
} else { } else {
this.searchIndicatorOff(); this.searchIndicatorOff();
} }
}; };
this.handleLaserOnHomeButton = function(rayPickInfo) { this.handleLaserOnHomeButton = function(rayPickInfo) {