mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 08:04:58 +02:00
with vive head-puck, isHeadController is true, even when HMD isn't mounted
This commit is contained in:
parent
48ee546545
commit
27664756de
2 changed files with 4 additions and 0 deletions
plugins/openvr/src
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue