How do I get a TileMap cell the mouse is hovering over?

Godot Version

4.2.2

Question

I have a tile map where I need to get what cell the mouse is hovering over

You can translate mouse pos to tile map pos, Then call the get_cell_tile_data method to obtain cell data

1 Like