iOS Touch Sprite Area?

Jason C.

Is it possible to enable a touch event on a sprite, but only if touched with a specific area within the sprite itself? I don't want the event to fire if the player touches the sprite outside the allowed touch area.


Or... can you get the touch xy like mouse xy in a touch event?
Have the event fire if the object is touched anywhere, then inside that event check the xy location and if its outside of the area you want it to react with then exit the event without running the code you want for when they touch inside the correct area.

Jason C.

Either change the collision mask or create a new object that fills this area.
Ok, so Collision Mask. I'm evaluating GM2, coming from Unity3D so I have this and other technical questions. Touch/Gesture Events can be peered with Collision Masks. I believe this is answer I needed. Same in Unity.