diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-01-12 22:24:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 22:24:37 +0100 |
commit | e62f57f51dd81ad806357d712402ed88aa296dc2 (patch) | |
tree | a359bad67df1cb9acd988d0c6c0c8936b00d65ae /modules/navigation | |
parent | c2790ec2b9ef737e7bcc203d7f7e6faf31e95862 (diff) | |
parent | dbdcc8e96855ac519654752767afad869fa41528 (diff) |
Merge pull request #70904 from huangjiaminhhh/master
Fix for navmesh baking when parsing StaticBody colliders
Diffstat (limited to 'modules/navigation')
-rw-r--r-- | modules/navigation/navigation_mesh_generator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 568e8b9b26..fff7a02fc4 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -207,11 +207,11 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans List<uint32_t> shape_owners; static_body->get_shape_owners(&shape_owners); for (uint32_t shape_owner : shape_owners) { + if (static_body->is_shape_owner_disabled(shape_owner)) { + continue; + } 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<Shape3D> s = static_body->shape_owner_get_shape(shape_owner, i); if (s.is_null()) { continue; |