You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
Fix cell_height for navigation meshes
Fixes `cell_height` for navigation meshes.
This commit is contained in:
@@ -110,6 +110,10 @@ void NavRegion::update_polygons() {
|
||||
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.");
|
||||
}
|
||||
|
||||
if (!Math::is_equal_approx(double(map->get_cell_height()), double(mesh->get_cell_height()))) {
|
||||
ERR_PRINT_ONCE("Navigation map synchronization error. Attempted to update a navigation region with a navigation mesh that uses a different `cell_height` than the `cell_height` set on the navigation map.");
|
||||
}
|
||||
|
||||
if (map && Math::rad_to_deg(map->get_up().angle_to(transform.basis.get_column(1))) >= 90.0f) {
|
||||
ERR_PRINT_ONCE("Navigation map synchronization error. Attempted to update a navigation region transform rotated 90 degrees or more away from the current navigation map UP orientation.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user