Hello everyone. I have two sprite nodes I want to activate for touch controls.
While the touch handlers for both sprites work, I can only activate the green sprite when I touch the area where both sprites overlap. Keep in mind that I am using the
node.on method for both sprites.
Is there a way to activate both sprites when the overlapped region is touched? Thanks.
If the nodes are siblings, then they caught touch point on the first responder, so only one can respond to the event. If they are parent and child, parent can use capture event to test against the touch point, both can respond to the event.
Otherwise, if you are targeting desktop, mouse event won’t be captured, so both should be able to respond to the event. You can also try on mobile, our mouse event should be emulated on mobile too