mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-21 19:41:17 +00:00
OpenXR apply controller pose from renderer
This commit is contained in:
parent
92941b3547
commit
42bf984ef8
1 changed files with 7 additions and 6 deletions
|
@ -1399,18 +1399,13 @@ void IN_VRInputFrame( void )
|
|||
moveJoystickState = GetActionStateVector2(moveOnRightJoystickAction);
|
||||
IN_VRJoystick(qtrue, moveJoystickState.currentState.x, moveJoystickState.currentState.y);
|
||||
|
||||
//controller pose
|
||||
if (engine->appState.TrackedController[0].Active)
|
||||
IN_VRController(qfalse, engine->appState.TrackedController[0].Pose);
|
||||
if (engine->appState.TrackedController[1].Active)
|
||||
IN_VRController(qtrue, engine->appState.TrackedController[1].Pose);
|
||||
|
||||
lastframetime = in_vrEventTime;
|
||||
in_vrEventTime = Sys_Milliseconds( );
|
||||
}
|
||||
|
||||
void IN_VRUpdateControllers( float predictedDisplayTime )
|
||||
{
|
||||
//get controller poses
|
||||
XrAction controller[] = {handPoseLeftAction, handPoseRightAction};
|
||||
XrPath subactionPath[] = {leftHandPath, rightHandPath};
|
||||
XrSpace controllerSpace[] = {leftControllerAimSpace, rightControllerAimSpace};
|
||||
|
@ -1427,6 +1422,12 @@ void IN_VRUpdateControllers( float predictedDisplayTime )
|
|||
ovrTrackedController_Clear(&VR_GetEngine()->appState.TrackedController[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//apply controller poses
|
||||
if (VR_GetEngine()->appState.TrackedController[0].Active)
|
||||
IN_VRController(qfalse, VR_GetEngine()->appState.TrackedController[0].Pose);
|
||||
if (VR_GetEngine()->appState.TrackedController[1].Active)
|
||||
IN_VRController(qtrue, VR_GetEngine()->appState.TrackedController[1].Pose);
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
|
Loading…
Reference in a new issue