You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix NavigationMesh not clearing old polygons
Fixes NavigationMesh not clearing old polygons.
This commit is contained in:
@@ -738,6 +738,7 @@ void NavigationMeshGenerator::bake_from_source_geometry_data(Ref<NavigationMesh>
|
|||||||
nav_vertices.push_back(Vector3(v[0], v[1], v[2]));
|
nav_vertices.push_back(Vector3(v[0], v[1], v[2]));
|
||||||
}
|
}
|
||||||
p_navigation_mesh->set_vertices(nav_vertices);
|
p_navigation_mesh->set_vertices(nav_vertices);
|
||||||
|
p_navigation_mesh->clear_polygons();
|
||||||
|
|
||||||
for (int i = 0; i < detail_mesh->nmeshes; i++) {
|
for (int i = 0; i < detail_mesh->nmeshes; i++) {
|
||||||
const unsigned int *detail_mesh_m = &detail_mesh->meshes[i * 4];
|
const unsigned int *detail_mesh_m = &detail_mesh->meshes[i * 4];
|
||||||
|
|||||||
Reference in New Issue
Block a user