Showing results for 
Search instead for 
Did you mean: 

OculusXRInput GetNodePositionValid failing


In FOculusXRInput::GetControllerOrientationAndPosition there are two lines that check the 'validity' of a motion source ...
bool bIsPositionValid = OVRP_SUCCESS(FOculusXRHMDModule::GetPluginWrapper().GetNodePositionValid(Node, &bResult)) && bResult;
bool bIsOrientationValid = OVRP_SUCCESS(FOculusXRHMDModule::GetPluginWrapper().GetNodeOrientationValid(Node, &bResult)) && bResult;

We are intermittently getting failures reported here, and I don't know why ... does anybody know what the GetNodePositionValid function actually checks? I can find no code or documentation for it ...



Answering my own question for any other lonely soul who finds themselves in this position ... I 'fixed' it by calling an Android permissions acquisition function on the first tick of the XRInput module ...
UAndroidPermissionFunctionLibrary::AcquirePermissions(Perms) specifically for READ_EXTERNAL_STORAGE (although other checks do work, but not all)

The issue seems to be that the focus for the app doesn't always get correctly set up so when the position is queried, the app at some low level, thinks it doesn't have focus when in fact it absolutely does. This call seems to correctly pull the focus onto the app and all is good.