How to get the position of a tile godot

Edition

4.3

Question

Hello Im trying to make a top down 2D game kind like the old Zelda games and I’m trying to find a way for an enemy in the game to find the position of a tile with a collision shape.

I use Raycasts to give the enemies in my game information about obstacles.

This article gives an overview on how it can be done:

Summary of all the above - you shoot raycasts in multiple directions and see what they collide with. With that information you make decisions about what path you take.