cancel
Showing results for 
Search instead for 
Did you mean: 

Detect Hand Tracking System gesture with OVRInput

dayekaye
Honored Guest
Hi there,

I'm making an app that uses Hand Tracking and I want the pause menu to appear when the user does a System Gesture with their no0n-dominant hand. In the docs it says that I should "poll Button.Start" which I have tried. This works with the touch controller but not hand tracking. Anyone have luck getting this system gesture to register? I'm posting some of my code below

public UnityEvent onUse;
    void Update()
    {
        if (OVRInput.Get(Button.Start)) {
            Debug.Log("System Gesture");
            onUse.Invoke();
        }
    }



Also here is the part of the documentation that talks about the system gestures

Check System Gestures

The
system gesture is a reserved gesture that allows users to transition to
the Oculus universal menu. This behavior occurs when users place their
dominant hand up with an open palm towards the headset and then pinch
with their index finger. When the users uses the non-dominant hand to
perform the gesture, it triggers the Button.Start event. You can poll Button.Start to integrate any action for the button press event in your app logic.

To detect the dominant hand, call the IsDominantHand property from OVRHand.cs and to check whether the user is performing a system gesture, call the IsSystemGestureInProgress property from OVRHand.cs. We recommend that if the IsSystemGestureInProgress property returns true,
the app should provide visual feedback to the user, such as rendering
the hand material with a different color or a highlight to indicate to
the user that a system gesture is in progress. The app should also
suspend any custom gesture processing when the user is in the process of
performing a system gesture. This allows apps to avoid triggering a
gesture-based event when the user is intending to transition to the
Oculus universal menu.



2 REPLIES 2

dayekaye
Honored Guest
I really misunderstood what the "code" formatting did. here is the code in a readable format

    public UnityEvent onUse;

    void Update()
    {
        if (OVRInput.Get(Button.Start)) {
            Debug.Log("System Gesture");
            onUse.Invoke();
        }
    }

marcocarlo88
Honored Guest

Did you solved?
If i use 

void Update()
    {
        if (OVRInput.Get(Button.Start)) {
            Debug.Log("System Gesture");
            onUse.Invoke();
        }
    }


NOTHING appens... 😞