in my game my player is moving with 5 controllers.
swipe 4 directions and touch...........
am getting confused with touch and swipe...
can any one suggest me how to do it...
Answer by sHajir
Feb 09 at 02:05 AM
Hi, did you find out how to differentiate a touch and a swipe ? I'm having the same problem. i tried to solve it via
-TouchPhase.Began (get current position)
-TouchPhase.Moved (check current position with position from began ->if difference is big then it is a swipe and no tap )
-TouchPhase.Ended (check current position with position from began ->if difference too is small then it is a tap and no swipe)
My Problem: tap is recognized too late, when my finger leaves the screen. This is because of TouchPhase.Ended. I'm looking for another solution.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
43 People are following this question.
Disable Input.getTouch in full screen
Replace touch movement!
my mobile button keeps pressing on its own instead of 1 tap
How touch works
Detect touch input