How to detect click on a game object? (SOLVED)

If you need to check the click on a rectangular area, then you can use this beautiful and clear post:

You can make this a little easier with the next module if you use sprite:

If you need to track a click on a shape of a complex shape, then there is a wonderful library with support for drag and other interesting things:

And if you need to perfectly check the complex shape, then you can take advantage of my project. But this is almost always not necessary:

5 Likes