From ce310c1e396ea4122f0e0496f9621318749970dd Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Wed, 14 Sep 2022 10:41:33 +0200 Subject: [PATCH] Exclude disabled CollisionShapes from Navigationmesh baking Excludes disabled CollisionShapes from the geometry parsing for the NavigationMesh baking. (cherry picked from commit 534ff93b05446f5692bcee95f51400c211b080ff) --- modules/navigation/navigation_mesh_generator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 8c1fd3d14af..ef7a21f3bd0 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -212,6 +212,9 @@ void NavigationMeshGenerator::_parse_geometry(const Transform &p_navmesh_xform, uint32_t shape_owner = E->get(); const int shape_count = static_body->shape_owner_get_shape_count(shape_owner); for (int i = 0; i < shape_count; i++) { + if (static_body->is_shape_owner_disabled(i)) { + continue; + } Ref s = static_body->shape_owner_get_shape(shape_owner, i); if (s.is_null()) { continue;