Merge branch 'pushToTalk' of https://github.com/wayne-chen/hifi into pushToTalk

This commit is contained in:
Wayne Chen 2019-03-07 12:54:49 -08:00
commit 44674d4baf

View file

@ -25,12 +25,13 @@ Script.include("/~/system/libraries/controllers.js");
this.shouldTalk = function (controllerData) {
// Set up test against controllerData here...
var gripVal = controllerData.secondaryValues[this.hand];
var gripVal = controllerData.secondaryValues[LEFT_HAND] && controllerData.secondaryValues[RIGHT_HAND];
return (gripVal) ? true : false;
};
this.shouldStopTalking = function (controllerData) {
var gripVal = controllerData.secondaryValues[this.hand];
var gripVal = controllerData.secondaryValues[LEFT_HAND] && controllerData.secondaryValues[RIGHT_HAND];
return (gripVal) ? false : true;
};