I’m trying to make a main menu in Unity that uses hand gestures as input for clicks. I’m trying to follow the Gallery tutorial to do so but it’s not something I need.
I need help with registering clenched hand as a Click function, I’m not sure how to do that
Thank you for your help
Okay, but I don’t really understand it so if you would be so kind to explain it to me
Of course. But you have to be more specific. At what point are you stuck, what have you tried etc. It’s a bit much to fully re-explain an existing tutorial.
- In the Pointer.cs script, add the “press / release” event handling. The “click” event will be performed if the user’s hand moves at a speed lower than the one specified in dragSensitivity. This is necessary to get rid of “phantom” clicks when the user actively moves his hand.
else if (selectedButton != null)
if (eventData.delta.sqrMagnitude < dragSensitivity)
eventData.dragging = true;
else if (eventData.dragging)
eventData.dragging = false;
I’m not sure how to make a generate click - I have a main menu with buttons and I want to navigate through it by using Hand gestures. When I finally get my hands in front of the button (Intel RealSense D435i) and I close my hand, “Click” is not happening
Are you sure you did the steps above right? Is everything in the editor linked etc? On the gallery control script.Also the actual clicking of the hands is added in the steps below. the part you’re talking about is just the dragging.
Yeah I’m not sure anymore… I don’t really understand what’s happening. All I want is - when I clench my hand above the button , click generates and OnClick function executes.
try the example scene and see what goes wrong. Is the example scene working?