11-24-2021 09:01 AM
I've written an oculus hand tracking plugin for unity openxr,
In it I call xrcreateHandTrackerEXT with right and left handles.
The mesh I get back is for the correct hand, but when I call locatejoints, I get the joints for the opposite hand, i.e. the left handle gets the right hand positions. Am I doing something stupid or is this broken?
XrHandTrackerCreateInfoEXT lh_create = new XrHandTrackerCreateInfoEXT(1);
XrHandTrackerCreateInfoEXT rh_create = new XrHandTrackerCreateInfoEXT(2);
int retVal=0;
retVal = GetInstanceProc<Type_xrCreateHandTrackerEXT>("xrCreateHandTrackerEXT")(curr_session, rh_create, out handle_right);
if(retVal!=0)
{
Debug.Log("Couldn't open right hand tracker: Error "+retVal);
return;
}
retVal = GetInstanceProc<Type_xrCreateHandTrackerEXT>("xrCreateHandTrackerEXT")(curr_session, lh_create, out handle_left);
if(retVal!=0)
{
Debug.Log("Couldn't open left hand tracker: Error "+retVal);
return;
}
11-24-2021 12:34 PM
Where I get the joint positions, like below, if I call xrLocateHandJointsEXT with handle_left, gives me the right hand joint positions. Calling it with handle_right gives me the left hand joint positions.
Irritatingly calling xrGetHandMeshFB gives me the correct left and right hand meshes. So right now in my mesh code, it is using the correct handles, whereas in joint animation it is using the opposite handle.
XrHandJointLocationEXT[] allJoints = new XrHandJointLocationEXT[26];
XrHandJointsLocateInfoEXT jli = new XrHandJointsLocateInfoEXT(OpenXRFeature.GetCurrentAppSpace(), frame_time);
XrHandJointLocationsEXT joints = new(ref allJoints);
Type_xrLocateHandJointsEXT fp = GetInstanceProc<Type_xrLocateHandJointsEXT>("xrLocateHandJointsEXT");
if (fp != null)
{
int retVal = fp(handle_left, jli, joints);
I don't know which way the hands work for
11-24-2021 01:29 PM
Thanks for reporting @joe.marshall.921677 - I can replicate this issue in the Unity Editor (but not in the standalone android builds). We will release a fix for this problem in the next release.
11-24-2021 01:31 PM
Phew. Not just me then!