Godot Version
4.2.2
Question
Hello.
I’m an experienced programmer but i have no idea about making games. Im trying to make a game for my friend as a gift, so i does not need to be high quality, follow all the best practices etc.
I have main lobby with few minigames one of which is a clone of packman with some customizations. I have my own map with tileset that defines navigation mesh for ghosts. The problem is that i want ghosts to move one way only - none of the ghosts should be able to turn 180 degree in place.
I was able to achieve that for one ghost by updating the tile map every 0.1 sek. The ghost is checking its position and velocity and remove the tile behind him, forcing navigationAgent2D to find a path that will move him forward (photo attached).
The problem is that with this solution every ghost should have its own tilemap with navigation mesh (so they will not break each other paths). When I added second tilemap it broke the existing one - the ghost get stuck every time on corners. I tried setting each navigation tilemap on separate navigation layer, telling navigationAgent explicity which map should he use but no luck.
Is there a better way to achieve such behavior? Thanks in advance for any suggestions and ideas.