I've read that native controls (buttons, scrollbars, etc) automatically get layered over sprites, and apparently there's no way to override this. I'm trying to determine if a touch takes place within a region defined by a sprite, even if the sprite is not the frontmost object (because a button is frontmost and overlapping the sprite).
In other languages I've used a within() function to tell whether a click/touch takes place within the rect of an object, or a defined region on the screen -- basically, if an x,y point falls within a rectangle. How is this done in Construct? Do I have to compare the X and Y values of the touch separately?
netdzynr I'm not sure if I understood your question properly but it sounds like you can use the Condition from the "Touch Plugin" which is >>>
-is touching object(choose your object here)
or
if you wanna check the negative
-is touching object(choose your object here)<<<<<Inverted
Example:
see here the Green object even if is behind the Orange object and you touch it will flash, doesn't matter how many objects are on top of it will still register the touch on the green object you can easily check if touched a region like you said with a rectangular object can be invisible too will not affect the touch
https://www.dropbox.com/s/8wltup956z2ivs6/TouchObject.capx?dl=0