Results 1 to 2 of 2

Thread: Touch/Swipe Size

  1. #1

    Touch/Swipe Size

    I wonder how to calculate pixels of swipe length using ZenGL?

    The game would apply force based on the touch size line. I would like to calculate that line from touch start to the touch end and get the pixels size value.

  2. #2
    Use simple vector maths:
      X := StartP.x - EndP.x;
      Y := StartP.y - EndP.y;
      Strength := SQR ((x*x) + (y*y));
    No signature provided yet.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts