- Home /
TouchPhase doesn't end when player swipes off screen
This problem has been troubling me recently and now I'm struggling on how to solve it. When I touch a button on the screen and then lift my finger then the TouchPhase.ended is called BUT if I swipe my finger off the screen then the TouchPhase.ended is never called.
I heard about rect.Contains but I don't know how to implement it right. Any help would be greatly appreciated.
In the worst case you could just check the screen resolution and check if the touch came close to the edge.
Answer by Owen-Reynolds · Sep 11, 2013 at 02:26 PM
Works fine for me (on an iPad.)
Specifically, running a tiny program that just prints all touch info, moving a finger off the side of the screen calls touchPhase.end. It looks no different than touch/release. Just for fun, it also works with 3 fingers (touch all three and drag my hand down: end, end0, end1, end2 pops up as each finger leaves.)
FYI, I noticed I could not get it to say just end with no begin, no matter how fast I tapped. I think IOS will always say begin one frame, then end the next, even if you tap/release between frames (but I haven't slowed down the framerate to really test that.)
Your answer
Follow this Question
Related Questions
Android Drag By Steps 0 Answers
multi touch / swipe issues 5 Answers
Camera swipe AND gameObject touch (Android) 1 Answer
Frame Drop on Touching or Swiping Screen 0 Answers