Search Unity

Differentating between left and right hand while using gestures

Discussion in 'VR' started by razielanarki, May 20, 2016.

  1. razielanarki

    razielanarki

    Joined:
    Jun 1, 2014
    Posts:
    58
    Hi!

    i'm trying to do something like the drone control scene in "fragments", and have ran into a bit of problem:
    has anyone found a way to differentiate between hands (left, or right) when capturing a gesture.


    the InteractionManager only reports back if the interaction was a hand with a different source.id for the same hand on sequential interactions, and i see no way in the GestureRecognizer to differentiate hands.

    how did they do it? :)
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Hello,

    I don't believe there is a good way off grabbing left or right hand from gesture recognizer, you might find something of use if you look through hands in the gesture recognizer. Also, maybe look into the InteractionManager or InteractionSource. Might find some useful information there.

    Thank you,
    Wesley
     
  3. razielanarki

    razielanarki

    Joined:
    Jun 1, 2014
    Posts:
    58
    well, what i actually did, is faked it using the InteractionSource to switch recognizers based on where the hand was first detected (using the first lossdirection vector and the headray in the "detected" event to decide it was the left or right side).

    not a perfect solution, as you cant use both hands at once, but works for our purposes.
     
  4. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    That sounds really awesome, pretty genius way to solve that problem. Sounds like you have things handled.

    Good Luck with your project