|Topic was automatically imported from the old Question2Answer platform.
I am new at godot. I am making a 2d game and I want the enemy to follow the player and if there is a wall between them it shuold go around the wall.
So, I used Navigation2D node with tile map. I watched some videos and copied some codes and it works fine.
The problem is that, the Navigation2D node creates a simple path, but this path is for dots, not for rects. My enemy is not a dot, it is a rectangle, and its center point follows the path. Therefore, while it goes through the corner of the wall, it looks like it is inside of the wall.
Is there any way to aviod this? How can the enemy collide with walls while it follows a path or how can we change the points of the path?