Hi!
Trying to implement detecting touch inside game elements and don't know how to make it.
I need at least two functions: detecting touch inside the shape (returns bool), checking the distance between touch and the shape (returns float).
I suppose that i can do it with Cocos2D using its own functions (checking sprite) or even creating CGPath and then check if the point is inside it but may be better to use Box2D shapes?
Any suggestions?
Trying to implement detecting touch inside game elements and don't know how to make it.
I need at least two functions: detecting touch inside the shape (returns bool), checking the distance between touch and the shape (returns float).
I suppose that i can do it with Cocos2D using its own functions (checking sprite) or even creating CGPath and then check if the point is inside it but may be better to use Box2D shapes?
Any suggestions?