I want to make a game which needs to drag an object (UIView
class object) and intersect with an another object (UIButton
) and the same time an event generates , and checks the matching of object is right or wrong.
If wrong the objects come back to its position.
The touch and drag I have done with the object but elasticity of the objects position is not working properly ? Any example or help Please
If you're using standard (non-GL) programming, you can use the object's frame to check if the objects intersect. There's a call for it. You can take the relevant points of one object and check if they are inside the other object's polygon. If they are, then you have a collision. The Quartz 2D drawing tools have lots of intersection methods for these types of objects.