LibGDX
How to detect a touch/click on a Rectangle object in LibGDX
When creating a game, most of the times you will be required to detect touch or a click on an object. By default, if you use Gdx.input.justTouched() and if you then try to get the coordinates touched by using Gdx.input.getX() and Gdx.input.getY(), then you will see that the touched points Read more…