diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp index 2f2278ae82..abff0770a7 100644 --- a/plugins/openvr/src/ViveControllerManager.cpp +++ b/plugins/openvr/src/ViveControllerManager.cpp @@ -165,6 +165,9 @@ void ViveControllerManager::deactivate() { } bool ViveControllerManager::isHeadController() const { + if (_inputDevice && _inputDevice->isHeadController()) { + return true; + } vr::EDeviceActivityLevel activityLevel = _system->GetTrackedDeviceActivityLevel(vr::k_unTrackedDeviceIndex_Hmd); return activityLevel == vr::k_EDeviceActivityLevel_UserInteraction; } diff --git a/plugins/openvr/src/ViveControllerManager.h b/plugins/openvr/src/ViveControllerManager.h index b06ba5bf89..d03818ea34 100644 --- a/plugins/openvr/src/ViveControllerManager.h +++ b/plugins/openvr/src/ViveControllerManager.h @@ -55,6 +55,7 @@ private: class InputDevice : public controller::InputDevice { public: InputDevice(vr::IVRSystem*& system); + bool isHeadController() const { return _overrideHead; } private: // Device functions controller::Input::NamedVector getAvailableInputs() const override;