How do you turn a tilemap (produced by TileD) for cocos2d where I can click on individual items and get a callback?
Is it just a case of converting captured touch and finding out where it is on the tilemap and then converting that to pixels -- but that doesn't say what item was clicked on.
I have a tilemap of a city with buildings on it, and I'd like to be able to click or press on a specific building, get a callback.
What would be the best way to accomplish this?
return nearestPiece(tilemap, playerTouchPos).contents
or similar? (Or is how to do that what you're asking?) \$\endgroup\$