adding check to see if near grabbing is ready

This commit is contained in:
Wayne Chen 2018-07-17 11:53:55 -07:00
parent 91f74aeb0a
commit 813c58a1fb

View file

@ -42,6 +42,16 @@ Script.include("/~/system/libraries/controllers.js");
return true;
}
}
nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabEntity" : "LeftNearParentingGrabEntity";
nearGrabModule = getEnabledModuleByName(nearGrabName);
if (nearGrabModule) {
return nearGrabModule.isReady(controllerData).active;
}
nearGrabName = this.hand === RIGHT_HAND ? "RightNearActionGrabEntity" : "LeftNearActionGrabEntity";
nearGrabModule = getEnabledModuleByName(nearGrabName);
if (nearGrabModule) {
return nearGrabModule.isReady(controllerData).active;
}
}
return false;
};