Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
joe.marshall.921677's avatar
4 years ago

Hand mesh vs joint locations flipped

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;
        }

 

3 Replies

  • 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 

    XR_FB_hand_tracking_aim but I'll find out tomorrow hopefully.