don't do a haptic pulse when av's hand goes near grabbable tablet

This commit is contained in:
Seth Alves 2017-02-22 14:14:10 -08:00
parent c967f9383a
commit aed1d69377

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();
}