diff options
author | Per Melin <git@melin.net> | 2024-06-06 23:20:05 +0200 |
---|---|---|
committer | Per Melin <git@melin.net> | 2024-06-07 14:24:39 +0200 |
commit | 9b191f669c40d82bfeb4182a088b92cc94213dc0 (patch) | |
tree | 95201db90c8471185f9a016a828c215b29cc750f /modules/navigation | |
parent | e96ad5af98547df71b50c4c4695ac348638113e0 (diff) | |
download | redot-engine-9b191f669c40d82bfeb4182a088b92cc94213dc0.tar.gz |
Fix NavigationServer3D.get_closest_point_to_segment() with use_collision
Diffstat (limited to 'modules/navigation')
-rw-r--r-- | modules/navigation/nav_map.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index dfbc92a919..1779be2cc2 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -617,7 +617,7 @@ Vector3 NavMap::get_closest_point_to_segment(const Vector3 &p_from, const Vector const Face3 f(p.points[0].pos, p.points[point_id - 1].pos, p.points[point_id].pos); Vector3 inters; if (f.intersects_segment(p_from, p_to, &inters)) { - const real_t d = closest_point_d = p_from.distance_to(inters); + const real_t d = p_from.distance_to(inters); if (use_collision == false) { closest_point = inters; use_collision = true; |