Merge pull request #10316 from sethalves/fix-stray-edit-laser

fix -- show hand lasers when edit is enabled, but not if there are not hand-controllers
This commit is contained in:
Clément Brisset 2017-05-01 10:48:59 -07:00 committed by GitHub
commit 5c46d1e3ff

View file

@ -1801,15 +1801,15 @@ function MyController(hand) {
}
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.
var rayPickInfo = this.calcRayPickInfo(this.hand);
this.intersectionDistance = (rayPickInfo.entityID || rayPickInfo.overlayID) ? rayPickInfo.distance : 0;
this.searchIndicatorOn(rayPickInfo.searchRay);
} else {
this.searchIndicatorOff();
}
}
};
this.handleLaserOnHomeButton = function(rayPickInfo) {