I know that for traditional UIViews, I can set \"enable user interaction\" flag to NO, and the view will no longer respond to touches, letting the views below them receive t
Sprite Kit uses the zPosition value only to determine the hit testing and drawing order.
So you could put all your sprites higher than 0 if you don't want to hit them. And then so a simple logic test is zPostion>0
If you set the userInteractionEnabled
property to YES
on a subclassed SKSpriteNode, then the touch delegates will called within the class. Hence, you can handle the touch for the sprite within its class.
However, by default, the userInteractionEnabled
property is set to NO
. Hence the touch on a sprite is, by default, a "tap through".
So, for the overlays you want, create custom classes for the sprites, implement the touchesBegan:
and other delegates within that class and while initialising, set the userInteractionEnabled
property to YES
.