In my player script I emit a signal when the mouse is pressed and a collision is detected with a RayCast2d collision point. This should remove the block that the RayCast2d being projected from the player collides with, but it seems to be inconsistent about what blocks it actually removes even some parts of the map it wont remove any blocks at all.
I didn't notice anything amiss when I output all the relevant variables to the console. I've been hitting my head on a wall trying to diagnose this for hours at this point any help is appreciated.
Here's the relevant code:
var collision_point = mine_ray.get_collision_point()
And in the script for the tilemap I have:
var tile = world_to_map(collision_point)
set_cell(tile.x, tile.y, -1)
Thanks for your input!