Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Differentating between left and right hand while using gestures

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

  1. raziel_anarki

    raziel_anarki

    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. raziel_anarki

    raziel_anarki

    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