diff --git a/modules/navigation_2d/2d/nav_map_builder_2d.cpp b/modules/navigation_2d/2d/nav_map_builder_2d.cpp index a2def2bd069..357e8b574c8 100644 --- a/modules/navigation_2d/2d/nav_map_builder_2d.cpp +++ b/modules/navigation_2d/2d/nav_map_builder_2d.cpp @@ -126,6 +126,7 @@ void NavMapBuilder2D::_build_step_find_edge_connection_pairs(NavMapIterationBuil // Add the polygon/edge tuple to this key. Connection new_connection; new_connection.polygon = ®ion->navmesh_polygons[connectable_edge.polygon_index]; + new_connection.edge = connectable_edge.edge; new_connection.pathway_start = connectable_edge.pathway_start; new_connection.pathway_end = connectable_edge.pathway_end; diff --git a/modules/navigation_2d/2d/nav_region_builder_2d.cpp b/modules/navigation_2d/2d/nav_region_builder_2d.cpp index 53bb025dd98..aec03aaa7a5 100644 --- a/modules/navigation_2d/2d/nav_region_builder_2d.cpp +++ b/modules/navigation_2d/2d/nav_region_builder_2d.cpp @@ -241,6 +241,7 @@ void NavRegionBuilder2D::_build_step_merge_edge_connection_pairs(NavRegionIterat ConnectableEdge ce; ce.ek = pair_it.key; ce.polygon_index = connection.polygon->id; + ce.edge = connection.edge; ce.pathway_start = connection.pathway_start; ce.pathway_end = connection.pathway_end; diff --git a/modules/navigation_2d/nav_utils_2d.h b/modules/navigation_2d/nav_utils_2d.h index 38135b6f855..93cdd00ce41 100644 --- a/modules/navigation_2d/nav_utils_2d.h +++ b/modules/navigation_2d/nav_utils_2d.h @@ -75,6 +75,7 @@ struct EdgeKey { struct ConnectableEdge { EdgeKey ek; uint32_t polygon_index; + int edge = -1; Vector2 pathway_start; Vector2 pathway_end; }; diff --git a/modules/navigation_3d/3d/nav_map_builder_3d.cpp b/modules/navigation_3d/3d/nav_map_builder_3d.cpp index 5886c717c09..03c91f972ad 100644 --- a/modules/navigation_3d/3d/nav_map_builder_3d.cpp +++ b/modules/navigation_3d/3d/nav_map_builder_3d.cpp @@ -127,6 +127,7 @@ void NavMapBuilder3D::_build_step_find_edge_connection_pairs(NavMapIterationBuil // Add the polygon/edge tuple to this key. Connection new_connection; new_connection.polygon = ®ion->navmesh_polygons[connectable_edge.polygon_index]; + new_connection.edge = connectable_edge.edge; new_connection.pathway_start = connectable_edge.pathway_start; new_connection.pathway_end = connectable_edge.pathway_end; diff --git a/modules/navigation_3d/3d/nav_region_builder_3d.cpp b/modules/navigation_3d/3d/nav_region_builder_3d.cpp index 36a004293cd..f8fa71ffc2e 100644 --- a/modules/navigation_3d/3d/nav_region_builder_3d.cpp +++ b/modules/navigation_3d/3d/nav_region_builder_3d.cpp @@ -242,6 +242,7 @@ void NavRegionBuilder3D::_build_step_merge_edge_connection_pairs(NavRegionIterat ConnectableEdge ce; ce.ek = pair_it.key; ce.polygon_index = connection.polygon->id; + ce.edge = connection.edge; ce.pathway_start = connection.pathway_start; ce.pathway_end = connection.pathway_end; diff --git a/modules/navigation_3d/nav_utils_3d.h b/modules/navigation_3d/nav_utils_3d.h index f1e58ff96a6..72cba469c4c 100644 --- a/modules/navigation_3d/nav_utils_3d.h +++ b/modules/navigation_3d/nav_utils_3d.h @@ -76,6 +76,7 @@ struct EdgeKey { struct ConnectableEdge { EdgeKey ek; uint32_t polygon_index; + int edge = -1; Vector3 pathway_start; Vector3 pathway_end; };