From 0b5c694b7497861a8b432d142d5758ce843559bb Mon Sep 17 00:00:00 2001 From: DualMatrix Date: Thu, 13 Sep 2018 21:11:33 +0200 Subject: Better heuristic for the shortest path algorithm for navigation2D and navigation. Better heuristic for the shortest path algorithm for navigation2D and navigation. It now will use the shortest distance to the polygon as cost instead of the distance to the center. --- scene/3d/navigation.h | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/3d/navigation.h') diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h index 5a501039c8..8f200997cd 100644 --- a/scene/3d/navigation.h +++ b/scene/3d/navigation.h @@ -94,6 +94,7 @@ class Navigation : public Spatial { Vector edges; Vector3 center; + Vector3 entry; float distance; int prev_edge; -- cgit v1.2.3