mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 19:14:59 +02:00
if the HMD isn't on someone's head, don't take input from the controllers
This commit is contained in:
parent
d15ac5761b
commit
03a47af628
1 changed files with 7 additions and 0 deletions
|
@ -179,6 +179,13 @@ void OculusControllerManager::RemoteDevice::focusOutEvent() {
|
|||
}
|
||||
|
||||
void OculusControllerManager::TouchDevice::update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) {
|
||||
ovrSessionStatus status;
|
||||
if (OVR_SUCCESS(ovr_GetSessionStatus(_parent._session, &status)) &&
|
||||
(ovrFalse == status.HmdMounted)) {
|
||||
// if the HMD isn't on someone's head, don't take input from the controllers
|
||||
return;
|
||||
}
|
||||
|
||||
_poseStateMap.clear();
|
||||
_buttonPressedMap.clear();
|
||||
|
||||
|
|
Loading…
Reference in a new issue