diff options
Diffstat (limited to 'modules/gdnavigation/nav_map.cpp')
-rw-r--r-- | modules/gdnavigation/nav_map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdnavigation/nav_map.cpp b/modules/gdnavigation/nav_map.cpp index 00a1901c48..338e49eb9f 100644 --- a/modules/gdnavigation/nav_map.cpp +++ b/modules/gdnavigation/nav_map.cpp @@ -691,7 +691,7 @@ void NavMap::sync() { const float ecm_squared(edge_connection_margin * edge_connection_margin); #define LEN_TOLLERANCE 0.1 #define DIR_TOLLERANCE 0.9 - // In front of tollerance + // In front of tolerance #define IFO_TOLLERANCE 0.5 // Find the compatible near edges. @@ -715,7 +715,7 @@ void NavMap::sync() { Vector3 rel_centers = other_edge.edge_center - edge.edge_center; if (ecm_squared > rel_centers.length_squared() // Are enough closer? && ABS(edge.edge_len_squared - other_edge.edge_len_squared) < LEN_TOLLERANCE // Are the same length? - && ABS(edge.edge_dir.dot(other_edge.edge_dir)) > DIR_TOLLERANCE // Are alligned? + && ABS(edge.edge_dir.dot(other_edge.edge_dir)) > DIR_TOLLERANCE // Are aligned? && ABS(rel_centers.normalized().dot(edge.edge_dir)) < IFO_TOLLERANCE // Are one in front the other? ) { // The edges can be connected |