kuligs2 Thanks, as mentioned I'm new to Godot and so not really following this.
I'm trying to identify what the cell coordinates of an AstarGrid2D isometric grid is, and I'm working in 2D. I've read through the info you linked on raycasting, but I don't understand how I can use this to identify the cell coordinates. The cell doesn't seem to exist as a thing so I don't understand how I can raycast to find it.
I have a function find_path on my TileMapLayer, called like:
destination = Vector2i(get_global_mouse_position())
path = _tile_map.find_path(position, destination)
Then the function is:
func find_path(start, end):
path = astar_grid.get_point_path(start, end, true)
return path.duplicate()
Currently 'start' and 'end' coordinates are screen coordinates, and I'm trying to work out how I convert these values to be the grid coordinates. e.g. they are currently something like (345, 233) and I need them to be more like (0,1) or (2,3).
I haven't been able to work out how ray casting fits into this.