Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Help] Gesture Recognition Script using Leap Motion

Discussion in 'Scripting' started by KLWN, Mar 28, 2020.

  1. KLWN

    KLWN

    Joined:
    Apr 11, 2019
    Posts:
    35
    Hi Devs,

    currently I'm working on a method on how to recognize simple gestures using a Leap Motion. At the moment I'm measuring the Distance between each finger tips and the distance between each finger tip to the palm.

    When doing a gesture I use those values as conditions to determine which gesture was performed.

    It kinda works but I'm not sure if this is the best method as Leap Motions tracking is very unstable. Ex. when one condition is true, let's say distance of index and middle finger, another condition may be not true in that exact moment. The gesture will only be recognized if all conditions are true at the same time.

    I was reading into kNN Tracking but that gives me headaches as I'm very new to coding. A friend of mine recommended to store the values of a couple of frames into an array and look for the smallest or winning distance, but I'm clueless.

    How would you approach it? Any help is appreciated

    best regards,
    Alex
     
    Last edited: Mar 28, 2020
  2. yumnanasir56

    yumnanasir56

    Joined:
    Apr 21, 2021
    Posts:
    1
    do you get the required answer