Jump to content
Happy Holidays! Limited Staff Responses: 1/20 - 1/31 ×

Detecting gestures


Zelda
 Share

Recommended Posts

Hi,
I'm running the sdk via my HTC Vive Pro and Unity (C#) . Everything seems to be working fine so far.
Now I just want to write a simple code that detects which of the five gestures was detected by the camera and then write it in the console. I just can't get it to work even though I feel like this should be an easy one.

Any help is much appreciated.

 

Link to comment
Share on other sites

Hi  

 

I think a simple scripts will do:

 

void Update() {  // do nothing if results is not changed  if (!GestureProvider.UpdatedInThisFrame) return;  if (GestureProvider.LeftHand != null)    Debug.Log("Left gesture is " + GestureProvider.LeftHand.gesture);  if (GestureProvider.RightHand != null)    Debug.Log("Right gesture is " + GestureProvider.RightHand.gesture);}

You can also refer to our usage document or sample document for more usages.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...