Godot Version
Godot v4.2.2 .NET
Question
Please find a GitHub repo with project files [here](https://github.com/b-commits/godot-sandbox/blob/master/TileMapHandler.cs)
.
Hey there,
I’m very new to game development, so please bear with me
I’m trying to make an isometric 2D game. I’ve added a TileMap
node and set its tile size to 32x16 for the isometric perspective. Then I’ve created some 32x32 tile assets in Aseprite and imported them to Godot. I’ve also written some code which I was hoping would allow me to click on a tile and replace it with another tile. Line 35 is the most important here.
Now, for the most part it works okay, but it’s not very precise. E.g. if I click on the exact pixel at the tip of the red arrow, the block above with yellow elements will get replaced instead.
I tried playing around with texture origin and moving the tile map around, but it still doesn’t work as intended.
Any suggestions as to how to fix it would be much appreciated.