I already know that i can use navpoly_add of Navigation2D, but how do I create a suitable NacigationPolygon?
I want something like this:
func get_simple_path(start : Vector2, end : Vector2, optimize : bool = true) :
var navigation_poly = NavigationPolygon.new()
var x = PoolVector2Array()
self.navpoly_add(navigation_poly, Transform2D(0, start))
return .get_simple_path(start, end, optimize)
So I want to add a NavigationPolygon as a square with a size of 96x96 at the start position, but that does not seem to work. Unfortunately, as far as I know, you can not output already created NavigationPolygons from Navigation2D to find my mistake.