mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-20 10:56:50 +01:00
Backported from godot4: Improve navigation map synchronisation error msgs
Improves navigation map synchronisation error msgs related to mismatch of cell sizes.
- smix8
7f2417135f
This commit is contained in:
parent
6db8d89ab7
commit
e3f889a63b
@ -787,7 +787,7 @@ void NavMap::sync() {
|
|||||||
connections[ek].push_back(new_connection);
|
connections[ek].push_back(new_connection);
|
||||||
|
|
||||||
// The edge is already connected with another edge, skip.
|
// The edge is already connected with another edge, skip.
|
||||||
ERR_PRINT_ONCE("Attempted to merge a navigation mesh triangle edge with another already-merged edge. This happens when the current `cell_size` is different from the one used to generate the navigation mesh. This will cause navigation problem.");
|
ERR_PRINT_ONCE("Navigation map synchronization error. Attempted to merge a navigation mesh polygon edge with another already-merged edge. This is usually caused by crossing edges, overlapping polygons, or a mismatch of the NavigationMesh / NavigationPolygon baked 'cell_size' and navigation map 'cell_size'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,10 @@ void NavRegion::update_polygons() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Math::is_equal_approx(double(map->get_cell_size()), double(mesh->get_cell_size()))) {
|
||||||
|
ERR_PRINT_ONCE("Navigation map synchronization error. Attempted to update a navigation region with a navigation mesh that uses a different `cell_size` than the `cell_size` set on the navigation map.");
|
||||||
|
}
|
||||||
|
|
||||||
PoolVector<Vector3> vertices = mesh->get_vertices();
|
PoolVector<Vector3> vertices = mesh->get_vertices();
|
||||||
int len = vertices.size();
|
int len = vertices.size();
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user