Forum Discussion
Anonymous
7 years agoovr_GetInputState does not return data
Hello,
I am working with Oculus SDK C++ and have specific requirement to read only oculus sensor data.
i have separate thread initialize oculus in the beginning with:
ovrInitParams initParams = { ovrInit_RequestVersion, OVR_MINOR_VERSION, NULL, 0, 0 };
ovrResult result = ovr_Initialize(&initParams);
if (OVR_FAILURE(result))
return false;
result = ovr_Create(&session, &luid);
if (OVR_FAILURE(result))
{
ovr_Shutdown();
return false;
}
and then in regular intervals I call
trackState = ovr_GetTrackingState(session, 0, ovrTrue);
bool success = OVR_SUCCESS(ovr_GetInputState(session, ovrControllerType_Touch, &inputState));
I get tracking state properly but inputState is always empty.
I am not getting any info from Buttons or joystick.
It is really minimum I need.
Please help.
4 Replies
- AnonymousHello.Thanks for reply.1) i want to use touch controllers and input to control my device.2) I simply create it with CreateThread. I don't render any UI in Rift. Just use minimum code required.
- STFSTFExplorerI think that corresponds to https://forums.oculusvr.com/developer/discussion/66763/issue-with-version-1-27-and-sdk-v1-26
Since SDK 1.27 it is not possible to get inputstate without rendering. :-/
That used to work before 1.27 and I used it successfully with FreePIE and vJoy. - STFSTFExplorerHi, I just found this thread https://forums.oculusvr.com/developer/discussion/33329/has-oculus-removed-the-ability-to-run-c-console-exes
There is a comment to initialize the ovr with the "Invisible" flag which I just tried:ovrInitParams initParams = { ovrInit_RequestVersion + ovrInit_Invisible, OVR_MINOR_VERSION, NULL, 0, 0 };ovrResult result = ovr_Initialize(&initParams);
With this intitialization, the InputState structure gets updated without any rendering. Maybe this helps you too.
Stefan - Anonymousthank you. i will try this out!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago