Sprite Kit - containsPoint for SKPhysicsBody?
- by gj15987
I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket".
When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the bucket.
This works fine, however, I actually want to check whether the ball is dropped onto the bucket node's physics body because my "bucket" is actually just an oval, and so I've applied a physics body which is the same shape as the oval, so that the white space around the oval isn't included in the physics simulation.
I can't seem to find a "containsPoint" function for physics bodies. Can anyone advise on how I'd check for this?
To summarise, I want to drop a node, onto a specific part of another node (or its physics body) and trigger an event.
Thanks in advance.