Merge pull request #109196 from smix8/pppedgecentered
Fix path post-processing edgecentered
This commit is contained in:
@ -126,6 +126,7 @@ void NavMapBuilder2D::_build_step_find_edge_connection_pairs(NavMapIterationBuil
|
|||||||
// Add the polygon/edge tuple to this key.
|
// Add the polygon/edge tuple to this key.
|
||||||
Connection new_connection;
|
Connection new_connection;
|
||||||
new_connection.polygon = ®ion->navmesh_polygons[connectable_edge.polygon_index];
|
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_start = connectable_edge.pathway_start;
|
||||||
new_connection.pathway_end = connectable_edge.pathway_end;
|
new_connection.pathway_end = connectable_edge.pathway_end;
|
||||||
|
|
||||||
|
|||||||
@ -241,6 +241,7 @@ void NavRegionBuilder2D::_build_step_merge_edge_connection_pairs(NavRegionIterat
|
|||||||
ConnectableEdge ce;
|
ConnectableEdge ce;
|
||||||
ce.ek = pair_it.key;
|
ce.ek = pair_it.key;
|
||||||
ce.polygon_index = connection.polygon->id;
|
ce.polygon_index = connection.polygon->id;
|
||||||
|
ce.edge = connection.edge;
|
||||||
ce.pathway_start = connection.pathway_start;
|
ce.pathway_start = connection.pathway_start;
|
||||||
ce.pathway_end = connection.pathway_end;
|
ce.pathway_end = connection.pathway_end;
|
||||||
|
|
||||||
|
|||||||
@ -75,6 +75,7 @@ struct EdgeKey {
|
|||||||
struct ConnectableEdge {
|
struct ConnectableEdge {
|
||||||
EdgeKey ek;
|
EdgeKey ek;
|
||||||
uint32_t polygon_index;
|
uint32_t polygon_index;
|
||||||
|
int edge = -1;
|
||||||
Vector2 pathway_start;
|
Vector2 pathway_start;
|
||||||
Vector2 pathway_end;
|
Vector2 pathway_end;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -127,6 +127,7 @@ void NavMapBuilder3D::_build_step_find_edge_connection_pairs(NavMapIterationBuil
|
|||||||
// Add the polygon/edge tuple to this key.
|
// Add the polygon/edge tuple to this key.
|
||||||
Connection new_connection;
|
Connection new_connection;
|
||||||
new_connection.polygon = ®ion->navmesh_polygons[connectable_edge.polygon_index];
|
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_start = connectable_edge.pathway_start;
|
||||||
new_connection.pathway_end = connectable_edge.pathway_end;
|
new_connection.pathway_end = connectable_edge.pathway_end;
|
||||||
|
|
||||||
|
|||||||
@ -242,6 +242,7 @@ void NavRegionBuilder3D::_build_step_merge_edge_connection_pairs(NavRegionIterat
|
|||||||
ConnectableEdge ce;
|
ConnectableEdge ce;
|
||||||
ce.ek = pair_it.key;
|
ce.ek = pair_it.key;
|
||||||
ce.polygon_index = connection.polygon->id;
|
ce.polygon_index = connection.polygon->id;
|
||||||
|
ce.edge = connection.edge;
|
||||||
ce.pathway_start = connection.pathway_start;
|
ce.pathway_start = connection.pathway_start;
|
||||||
ce.pathway_end = connection.pathway_end;
|
ce.pathway_end = connection.pathway_end;
|
||||||
|
|
||||||
|
|||||||
@ -76,6 +76,7 @@ struct EdgeKey {
|
|||||||
struct ConnectableEdge {
|
struct ConnectableEdge {
|
||||||
EdgeKey ek;
|
EdgeKey ek;
|
||||||
uint32_t polygon_index;
|
uint32_t polygon_index;
|
||||||
|
int edge = -1;
|
||||||
Vector3 pathway_start;
|
Vector3 pathway_start;
|
||||||
Vector3 pathway_end;
|
Vector3 pathway_end;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user