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.
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.
Use simple vector maths:
Code:X := StartP.x - EndP.x; Y := StartP.y - EndP.y; Strength := SQR ((x*x) + (y*y));
No signature provided yet.
Bookmarks