diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index 260f16cd60d..aebd444e7be 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -646,7 +646,8 @@ debug path break; } - path.push_back(begin_point); + if (path[path.size() - 1].distance_to(begin_point) > CMP_EPSILON) + path.push_back(begin_point); path.invert(); }