Godot Version
v4.2.1
Question
`Hello,
I am attempting to create an enemy that uses AStarGrid2d navigation. I have a couple of solid tiles in my grid and a few which have their weight set to 100. This is in an attempt to force the enemy to pathfind around these tiles no matter how long the path will be as long as its possible. Incase it isn’t, it should make a path through the least of these tiles as possible. This works as expected, up until it starts pathfinding diagonally. `
This is my setup:
-
Red tiles are solid
-
Brown tiles are the ones with increased weight
-
Yellow tile is the goal
-
Green tile is the enemy
-
Lime path is the current (unwanted) one
-
Blue path is the desired one
The reason i want this is that the brown tiles are going to be breakable by the enemy, but I want it to choose the path of least resistance.
Diagonal mode is set to No obstacles. Sadly it only considers solid tiles as “Obstacles”. Is there way for me to modify the pathfinding to get the desired effect?
Thank you.