TMXLayer.getTileAt
Opened this issue · 1 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. getting the tile at the users touch coordinates
2.
3.
What is the expected output? What do you see instead?
the touch coordinates should correspond to their respective tile in the tilemap.
What version of the product are you using? On what operating system?
current jar from examples
Please provide any additional information below.
shouldn't one divide by the tile height for within the getTileAt method to get
the tile row?
Original issue reported on code.google.com by p.love.m...@gmail.com
on 4 Aug 2011 at 4:44
GoogleCodeExporter commented
To be clear...
in TMXLayer.java, getTileAtXY() currently has the following
final int tileRow = (int)(localCoords[VERTEX_INDEX_Y] /
tmxTiledMap.getTileWidth());
and it should be
final int tileRow = (int)(localCoords[VERTEX_INDEX_Y] /
tmxTiledMap.getTileHeight());
ie, location dived by tile height, not width.
Original comment by sean.stu...@gmail.com
on 8 Sep 2011 at 9:46