fix tablet interaction and far grab functionallity

This commit is contained in:
Dante Ruiz 2018-01-08 11:30:21 -08:00
parent 724db93389
commit fd83e00df4
2 changed files with 7 additions and 5 deletions

View file

@ -148,8 +148,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
this.setIgnorePointerItems = function() {
if (HMD.tabletID !== this.tabletID) {
this.tabletID = HMD.tabletID;
Pointers.setIgnoreItems(_this.leftPointer, _this.blacklist);
Pointers.setIgnoreItems(_this.rightPointer, _this.blacklist);
Pointers.setIgnoreItems(_this.leftPointer, _this.blacklist.concat([HMD.tabletID]));
Pointers.setIgnoreItems(_this.rightPointer, _this.blacklist.concat([HMD.tabletID]));
}
};
@ -378,8 +378,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
};
this.setBlacklist = function() {
RayPick.setIgnoreItems(_this.leftControllerRayPick, this.blacklist);
RayPick.setIgnoreItems(_this.rightControllerRayPick, this.blacklist);
RayPick.setIgnoreItems(_this.leftControllerRayPick, this.blacklist.concat([HMD.tabletID]));
RayPick.setIgnoreItems(_this.rightControllerRayPick, this.blacklist.concat([HMD.tabletID]));
};
var MAPPING_NAME = "com.highfidelity.controllerDispatcher";

View file

@ -447,7 +447,9 @@ Script.include("/~/system/libraries/Xform.js");
this.targetObject = new TargetObject(entityID, targetProps);
this.targetObject.parentProps = getEntityParents(targetProps);
Script.clearTimeout(this.contextOverlayTimer);
if (this.contextOverlayTimer) {
Script.clearTimeout(this.contextOverlayTimer);
}
this.contextOverlayTimer = false;
if (entityID !== this.entityWithContextOverlay) {
this.destroyContextOverlay();