Esempio n. 1
0
 static void EnableLeapAsCursor(Point coordinate, FingerList fingers)
 {
     if ((int)fingers[0].TipVelocity.Magnitude <= 25)
     {
         return;
     }
     LeapAsMouse.SetCursorPos((int)coordinate.X, (int)coordinate.Y);
 }
Esempio n. 2
0
 static void EnableClickWithLeap(Point coordinate, FingerList fingers)
 {
     if (fingers.Count != 2)
     {
         return;
     }
     LeapAsMouse.mouse_event(0x0002 | 0x0004, 0, (int)coordinate.X, (int)coordinate.Y, 0);
 }
Esempio n. 3
0
 // Update is called once per frame
 void Update()
 {
     //check which point should use to display cursor
     if (useMotorPoint)
     {
         cursorPoint = PointingParameters.MotorPoint;
     }
     else
     {
         cursorPoint = PointingParameters.DispPoint;
     }
     //check how and which cursor should show
     if (use2DmousePointer)
     {
         LeapAsMouse.SetCursorPos((int)cursorPoint.x, UnityEngine.Screen.height - (int)cursorPoint.y);
     }
     if (use3Dcursor)
     {
         HandCursorPosition();
     }
 }