Hello everyone,
Quick questions - If a user's touch goes outside of certain bounds I want to cancel touch event. How can I do that? Thanks.
A.
A fast, easy to use, free, and community supported 2D game engine
Hello everyone,
Quick questions - If a user's touch goes outside of certain bounds I want to cancel touch event. How can I do that? Thanks.
A.
I may be mistaken but i think that it is done, you just have to implement onTouchCancel or something like that.
while in touch, check if the touch still is in the boundary, else cancel touch ?
I know how to detect if user's touch is outside a certain bounds. What I don't know is how to invoke cancel/end touch functionality. Suppose a user is dragging an object, and that object goes outside a certain boundary. When that object get outside a boundary I want to trigger end/cancel touch call.
You might be able to do what pabloruiz55 suggested, but if the touch is still actually down, wouldn't that muck up the internal handling? You might need to handle this within your own code, so you flag that touch as finished yourself, and ignore any other move calls from it?
You must log in to post.