mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 07:35:15 +02:00
Merge pull request #8350 from sethalves/ignore-touch
if the oculus HMD isn't on someone's head, don't take input from the controllers
This commit is contained in:
commit
f0c944b0c3
1 changed files with 6 additions and 0 deletions
|
@ -182,6 +182,12 @@ void OculusControllerManager::TouchDevice::update(float deltaTime, const control
|
||||||
_poseStateMap.clear();
|
_poseStateMap.clear();
|
||||||
_buttonPressedMap.clear();
|
_buttonPressedMap.clear();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
int numTrackedControllers = 0;
|
int numTrackedControllers = 0;
|
||||||
static const auto REQUIRED_HAND_STATUS = ovrStatus_OrientationTracked & ovrStatus_PositionTracked;
|
static const auto REQUIRED_HAND_STATUS = ovrStatus_OrientationTracked & ovrStatus_PositionTracked;
|
||||||
auto tracking = ovr_GetTrackingState(_parent._session, 0, false);
|
auto tracking = ovr_GetTrackingState(_parent._session, 0, false);
|
||||||
|
|
Loading…
Reference in a new issue