provencher / MRTK-Quest

MRTK-Quest: Mixed Reality Toolkit (MRTK) extension bridge for Oculus Quest + Rift / S
Other
389 stars 67 forks source link

Finger Curl Calculation Addition #65

Closed chetu3319 closed 4 years ago

chetu3319 commented 4 years ago

Adding functions to calculate the curl of fingers. Example usage:

// Compute the curl of Index Finger of Right Hand
float indexCurl =  HandPoseUtils.IndexCurl(Handedness.Right);

Output ranges from 0 (No-Curl) to 1 (Fully-Curled) finger.

chetu3319 commented 4 years ago

I've made the suggested updates of calculating gripStrength from the finger's curl value. I carried two different calculation:

  1. Only considering the index and middle finger's curl value. Works for full hand grip, but provides a false visual cue when only that two fingers are curled.
  2. Considering all four fingers' curl value. Works perfectly providing intended visual cue.