コード例 #1
0
    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);
    }
コード例 #2
0
    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;
    }
コード例 #3
0
ファイル: LeapHands.cs プロジェクト: damned/textry-leap
 void Update()
 {
     debug.Log("r confidence: " + Frame().Hands.Rightmost.Confidence);
     OnHandUpdate(hand);
 }