Skip to main content
New Participant
January 19, 2020

Quest: check if HandTracking or Controller is active

Is there a way in Unity to check if Handtracking is active or controller?
With OVRHand.IsTracked I can check if a hand is currently tracked, but this does not tell me if handtracking is active.

Also, is there a similar command to check if teh Quest lost controller tracking (controller out of sight of quest cameras)?

    4 replies

    Participant
    April 15, 2021

    I encountered this problem as well since IsTracked is always true so I can't depend on it.

    My solution is a bit of a hack but it solved the problem for me. Just expose the variable shown below in OVRMeshRenderer class and make use of it in your own class. This variable is true when the hand is visible (hand tracking mode) and false otherwise. OVRMeshRenderer is a component inside the OVRHands prefab which is instanced per hand.

     

        public bool shouldRender = false;//My Hacky Fix CODE
        private void Update()
        {
            if (_isInitialized)
            {
                //bool shouldRender = false;//Original CODE
    
                if (_dataProvider != null)
                {
                    var data = _dataProvider.GetMeshRendererData();

     

    korinVR
    Honored Contributor
    April 16, 2021

    I use OVRInput.IsControllerConnected(OVRInput.Controller.Hands) to check if hand-tracking mode is active.

    Katsuomi Kobayashi ( @korinVR ) at FrameSynthesis Inc.
    New Participant
    July 25, 2024
    OVRInput.IsControllerConnected(OVRInput.Controller.LHand) 
     
    LHand and RHand if you want to differentiate handness
     
    April 20, 2022

    Well im a bit late here but anyways... You can use OVRPlugin.GetHandTrackingEnabled() to check if hand tracking is enabled