Top-down 2d game and I need help creating a script to detect what tile a Point2D is on top of

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CheetoPuffs

I also need help to remove the tile at the click of a button, what I am creating is a building mechanic for my game.
The tilemap and the player are both sibling nodes of a Node2D, but the player is from a different scene which has a child node of a Point2D. I’m new to godot and I really need some help on this script. It’s been a pain in the ass for the past week.

Thanks!

:bust_in_silhouette: Reply From: exuin

You can use _input function to detect click and use world_to_map on the TileMap to remove the cell.