I am currently working on a simple 2d tower defense game, where the towers can be placed anywhere on the map. The path for each enemy from its spawn to its goal is calculated using the getsimplepath method, provided by the navigation2D node. What I would like to do now, is checking, if there is still a possible path, before I place a new tower on a certain position. In other words, I would like to know, if a tower blocks the path, before I even placed It on theh field.
Does anyone know, if it is possible to do that?
And yes, I know that A* pathfinding exists, but I never worked with it and would probably have to write the whole code for it myself....