Skip to content

Latest commit

 

History

History

Hand Tracking Setup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Hand Tracking Manager for Lens Studio


This script creates super handy callbacks for hand tracking - whether it's on mobile, Spectacles, or emulating using tap & hover in the preview panel!
On Spectacles, this should be combined with Spectacles Interaction Kit.

twitter (@maksvanleeuwen)




(This script needs LSQuickScripts in your project in order to work.)



Usage

Callbacks (any hand)

Bind using .add(f) and .remove(f).
Bind to HandTracking, for example: HandTracking.onPinchStart.add( function(pos, isTap){} ).

  • .onPinchStart → (pos, isTap)
  • .onPinchHold → (pos, isTap)
  • .onPinchEnd → (pos, isTap)
  • .onTrackStart → (isTap)
  • .onTrackEnd → (isTap)
  • .onActiveHandChange → (prvHand, curHand)

Tracking Info

  • .getActiveHand()Hand
  • .getDominantHand()Hand
  • .getPinching()bool
  • .getPinchPosition()vec3
  • .getPinchForward()vec3 (normalized)
  • .getPinchUp()vec3 (normalized)
  • .getHoverScreenPosition()vec2
  • .getHoverWorldPosition()vec3

Data Types

  • pos: position vec3, world space
  • isTap: bool if emulated (preview panel tapping instead of pinch)
  • Hand: string ('left'|'right')