Start a new topic
Answered

How to TrackingStates of the hands?

So I am trying to read the tracking state of the hands. For the OpenXR I am using XRHandSubsystem to read all the relevant and necessary events to get the hand tracking state for both hands. 


In the QCHT API Docs it is mentioned in the docs that we can use XR Hand Subsystem to get the hand related information and it's tracking state.


Now the issue is that when I create a build and run it in the dev kit I am get 0 subsystems from following function.

SubsystemManager.GetSubsystems(subsystems);

 And when I run the same build in Quest-3 I always at-least one HandSubsystem from the above function.


Best Answer

Hi again, quick update on this; Here's a code sample on how to use the API:



using UnityEngine;
using QCHT.Interactions.Core;

public class QCHT_HTStatusTest : MonoBehaviour
{
    void CheckSubsystemStatue()
    {
        var subsystem = XRHandTrackingSubsystem.GetSubsystemInManager();
        switch (subsystem.Status)
        {
            case HandTrackingStatus.Idle:
                break;
            case HandTrackingStatus.Running:
                break;
            case HandTrackingStatus.Error:
                break;
        }
    }
}



There is an input binding in the QCHT samples asst "Default QCHT Input Actions" where "isTracked" and "trackingState" are available. 


Unfortunately that doesn't quite give the exact same data as the subsystem API. I'm checking with the QCHT team about accessing the prefered method of accessing the tracking state. 

Answer

Hi again, quick update on this; Here's a code sample on how to use the API:



using UnityEngine;
using QCHT.Interactions.Core;

public class QCHT_HTStatusTest : MonoBehaviour
{
    void CheckSubsystemStatue()
    {
        var subsystem = XRHandTrackingSubsystem.GetSubsystemInManager();
        switch (subsystem.Status)
        {
            case HandTrackingStatus.Idle:
                break;
            case HandTrackingStatus.Running:
                break;
            case HandTrackingStatus.Error:
                break;
        }
    }
}



1 person likes this
Login to post a comment