Fix path post-processing edgecentered

Fixes path post-processing edgecentered.
This commit is contained in:
smix8 2025-08-01 15:06:30 +02:00
parent dda2614aca
commit a3f393a3e1
6 changed files with 6 additions and 0 deletions

View file

@ -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 = &region->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;

View file

@ -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;

View file

@ -75,6 +75,7 @@ struct EdgeKey {
struct ConnectableEdge {
EdgeKey ek;
uint32_t polygon_index;
int edge = -1;
Vector2 pathway_start;
Vector2 pathway_end;
};

View file

@ -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 = &region->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;

View file

@ -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;

View file

@ -76,6 +76,7 @@ struct EdgeKey {
struct ConnectableEdge {
EdgeKey ek;
uint32_t polygon_index;
int edge = -1;
Vector3 pathway_start;
Vector3 pathway_end;
};