i get the very same output
(408, 200)(1296, 200)
[(408, 200), (1296, 200)]
[(0, 0)]
which is correct as it is possible to reach the finish point with a single step from the starting point, therefore the path contains only 2 point: start, finish.
below the result if I set the finish point as 1220,440. You can see the path contains 2 more change of direction points.
(408, 200)(1220, 440)
[(408, 200), (384, 248), (384, 312), (1220, 440)]
[(0, 0)]
you can visualise the path adding these 2 lines
func _draw():
draw_polyline(path, Color(1,1,1), 1)
i'm not sure what happens with var vectors = PoolVector2Array(Array([path]))
, i think it's not possible to convert an array to a poolvector2 array that easily.
Said that, i dont understand what is the point of doing this double conversion, as path
is already a PoolVector2Array