home button works with the stylus

This commit is contained in:
Dante Ruiz 2017-01-10 22:03:54 +00:00
parent ad48e79053
commit d0baa0e303

View file

@ -1220,12 +1220,27 @@ function MyController(hand) {
if (this.handleStylusOnWebOverlay(rayPickInfo)) {
return;
}
this.handleStylusOnHomeButton(rayPickInfo);
}
} else {
this.hideStylus();
}
};
this.handleStylusOnHomeButton = function(rayPickInfo) {
var pointerEvent;
if (rayPickInfo.entityID) {
var entity = rayPickInfo.entityID;
var name = entityPropertiesCache.getProps(entity).name;
if (name == "homeButton") {
Messages.sendLocalMessage("home", entity);
//this.grabbedEntity = entity;
//this.setState(STATE_ENTITY_STYLUS_TOUCHING, "begin touching entity '" + name + "'");
}
}
};
this.clearEquipHaptics = function() {
this.prevPotentialEquipHotspot = null;
};