[Plugin] Leap Motion - Event Driven

Glad the plugins are being useful :slight_smile:

You can determine a thumbs up state by getting the xvector from your thumb rotation and taking the dot product between it and the Z up vector (0,0,1). If it’s positive the thumb is pointing up. You can also use the dot product to get the angle between the two vectors which can allow you to only recognize a thumb up if its e.g. within ~ 30degrees from the vertical. Finally i’d also check if all your other fingers are close enough to a point near the palm to count making a fist (optionally use the grab event). Using those two criteria you should be able to determine a thumb up gesture (calculate on tick, if criteria is met send a thumbs up event or call your thumbs up function)

Ps: you should show some chocolate pictures when it’s released, i’m sure the hungry devs here would love the see it!