Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

How can I test if the mouse draw on the active tiles?

$
0
0

I want to draw some sprites in a tiledmap where the tiles are active.
I want to draw with the mouse, so how could I compare the position of the mouse, the sprite position and the position of active tiles?
I tried to compare:
sprite.getX, screenX and cell.getTile (). getProperties (). containsKey ("active")
but I can not get the position of the active tiles.


Viewing all articles
Browse latest Browse all 434

Trending Articles