public Vector3 Centre() { Vector palmPosition = GetHand().PalmPosition; Vector3 grabPosition = hands.ToUnityWorldSpace(palmPosition); // debug.Log("grab pos (rel to hand controller): " + localGrabPosition); debug.Log("grab pos (world space): " + grabPosition); return(grabPosition); }
void Start() { hands = GetComponent <LeapHands>(); debug = GetComponent <LiveDebug>(); knobs = GameObject.Find("interactables").GetComponent <Knobs>(); letters = GameObject.Find("letters").GetComponent <Letters>(); debug.Log("knobs and letters: " + knobs + ", " + letters); knobArranger = new KnobArranger(letters, knobs); knobArranger.Arrange(0f); grabStrategy = new GrabStrategy(knobs, knobArranger, debug); hands.OnHandUpdate += OnHandUpdate; }
void Update() { debug.Log("r confidence: " + Frame().Hands.Rightmost.Confidence); OnHandUpdate(hand); }