Open Torakko opened 4 years ago
Four cases:
1.Outside walking area: Go to closest edge vertex. Future improvement: Go to closest edge.
In current polygon: Just go to click positin
In adjacent polygon Go towards center of adjacent polygon (case 2 after crossed border) Future improvement: Go to closest point of border.
In a non-adjacent polygon Use Dijkstras algorithm to find shortest path. Get next polygon in path and do as in 3.
Four cases:
1.Outside walking area: Go to closest edge vertex. Future improvement: Go to closest edge.
In current polygon: Just go to click positin
In adjacent polygon Go towards center of adjacent polygon (case 2 after crossed border) Future improvement: Go to closest point of border.
In a non-adjacent polygon Use Dijkstras algorithm to find shortest path. Get next polygon in path and do as in 3.