Jump to content
 
Sign in to follow this  
Zelda

Detecting gestures

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.

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Please sign in to comment

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

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...