for the moment, vive input plugin isn't a head-controller unless the HMD is being worn

This commit is contained in:
Seth Alves 2017-06-01 14:35:53 -07:00
parent 552b69bb1c
commit f45db99149
2 changed files with 6 additions and 1 deletions

View file

@ -138,6 +138,11 @@ void ViveControllerManager::deactivate() {
_registeredWithInputMapper = false;
}
bool ViveControllerManager::isHeadController() const {
vr::EDeviceActivityLevel activityLevel = _system->GetTrackedDeviceActivityLevel(vr::k_unTrackedDeviceIndex_Hmd);
return activityLevel == vr::k_EDeviceActivityLevel_UserInteraction;
}
void ViveControllerManager::pluginUpdate(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) {
if (!_system) {

View file

@ -41,7 +41,7 @@ public:
const QString getName() const override { return NAME; }
bool isHandController() const override { return true; }
bool isHeadController() const override { return true; }
bool isHeadController() const override;
bool activate() override;
void deactivate() override;