askariwa Posted May 4, 2016 Share Posted May 4, 2016 Hi, i am trying to get the type of a tile once clicked on but i get inconsistent results, i have made an example of my case here : http://jsfiddle.net/fkossyvas/7Lybhpda/ The code which displays the type is this one : this.currentTile = this.map.getTileWorldXY(pointer.worldX,pointer.worldY,32,32,this.layer); this.text1="pointer.worldX:"+pointer.worldX; this.text2="pointer.worldX:"+pointer.worldX; this.text3="currentTile index:"+this.currentTile.index; Any help ? Thank you Link to comment Share on other sites More sharing options...
askariwa Posted May 12, 2016 Author Share Posted May 12, 2016 Ok, it was my fault My map had too many layers and i was expecting results from the wrong layer. I should have tried to use a simple tilemap with just one level because getTileWorldXY works as advertised Link to comment Share on other sites More sharing options...
Recommended Posts