How to abort a touch

Hi ok. I am testing my project on android and I noticed that if I lock the screen while holding a touch on the screen, when I come back to the game it’s like that touch is frozen. How can I tell? Because now with one touch it will trigger my pinch extension camera zoom and zoom out crazily as far as my min zoom cap will let it go. Then all seems normal after it zooms out crazily. Ok so I put 2 touches on the screen, then locked the screen, then came back, now I can zoom my camera in and out with just one swiping touch back and forth. Put 2 touches on, then remove, now it seems normal again.

So we can blame pinch extension? No. Because I got on my pc and made a project with the multitouch example, no extension. I make 1 touch on screen in preview and minimize preview. When I bring it back up, the marker is still there in place. It won’t go away. Same for any amount of touches.

So my question is, is there a way for me to tell it to abort touches in these kind of situations. I’m not sure what condition I should be looking for.

Just to update, when I test my project on the pc, by holding a touch and minimizing the preview, it does not zoom out crazily it just lets me zoom in and out with a swiping finger when I come back to it, and it does not go back to normal. When I do the test with 2 or more touches and come back, it does not let me zoom or drag camera with mouse (which is probably because I have a condition to disable drag camera when touch is pinching, and the touches are frozen so it thinks they’re pinching, and it probably won’t allow zoom also because the touches are frozen, and the pinch extension only works on the first set of pinches, not multiple, so it thinks the first touches are there so they’re not moving so it’s not zooming). It also does not go back to normal like it seems to on android.

How are you currently starting and stopping the pinch? If you’re using mouse released then maybe it’s not being triggered after you lock the screen because it’s not running or has the focus. Maybe instead of mouse released try an inverted mouse pressed or held

Errrm, I am not starting and stopping it…heh heh. Ooops. I just made a condition that said enable camera pinch yes. Then I guess I thought the camera pinch fairies would take care of the rest.

Thanks Keith when I get home I’ll look into enabling/disabling and what conditions to use.


You’re welcome. There is also a condition to check if it’s enabled and one for is pinching. Hypothetically, where would one find a “camera pinch fairy”? Asking for a friend. :grinning:

IDK enough about the extension as far when to enable. The function seems to detect the double touch. So, I’m guessing the regular single press should be fine. Maybe check an example or 2. See how they use it.