Merge pull request #9729 from sethalves/tablet-ui-no-haptics-for-tablet

don't do a haptic pulse when av's hand goes near grabbable tablet
This commit is contained in:
Anthony Thibault 2017-02-22 15:55:01 -08:00 committed by GitHub
commit 44136e550c

View file

@ -1233,7 +1233,13 @@ function MyController(hand) {
});
if (grabbableEntities.length > 0) {
if (!this.grabPointIntersectsEntity) {
Controller.triggerHapticPulse(1, 20, this.hand);
// don't do haptic pulse for tablet
var nonTabletEntities = grabbableEntities.filter(function(entityID) {
return entityID != HMD.tabletID && entityID != HMD.homeButtonID;
});
if (nonTabletEntities.length > 0) {
Controller.triggerHapticPulse(1, 20, this.hand);
}
this.grabPointIntersectsEntity = true;
this.grabPointSphereOn();
}