diff options
| author | Rémi Verschelde | 2017-08-16 17:08:06 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-16 17:08:06 +0200 |
| commit | a8ceb54abf55ddbc3b7148c1d149bf525348aa60 (patch) | |
| tree | dfc93a5171106ebf9856c659e2120f6dfa26c308 | |
| parent | 5422585db6a2405e5481a2ffbe5c9085b17e0521 (diff) | |
| parent | 71a496803c6c8cd840a88644529f12d93f2603fc (diff) | |
| download | godot-a8ceb54abf55ddbc3b7148c1d149bf525348aa60.tar.gz godot-a8ceb54abf55ddbc3b7148c1d149bf525348aa60.tar.zst godot-a8ceb54abf55ddbc3b7148c1d149bf525348aa60.zip | |
Merge pull request #10376 from RandomShaper/fix-nav-double-point
Fix double point in Navigation2D
| -rw-r--r-- | scene/2d/navigation2d.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index e57983890..383236b4c 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(); } |
