How can I detect touch on a specific area of a node?
Just an example:
https://i.stack.imgur.com/8jvFb.png
How can i perform an action only when the bottom left part of the red node is touched(the yellow rectangle)?
This is what i have to perform an action for when any part of the node is touched:
if atPoint(location).name == "bubble"{
node.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 70))
}