mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
for the moment, vive input plugin isn't a head-controller unless the HMD is being worn
This commit is contained in:
parent
552b69bb1c
commit
f45db99149
2 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue