summaryrefslogtreecommitdiff
path: root/modules/navigation
diff options
context:
space:
mode:
authorhuangjiamin <huangjiamin@wdabuliu.com>2023-01-03 19:13:32 +0800
committerhuangjiamin <huangjiamin@wdabuliu.com>2023-01-03 19:13:32 +0800
commitdbdcc8e96855ac519654752767afad869fa41528 (patch)
tree6a0b80e1759ae57e6cde70a1cd6614763efbbeb3 /modules/navigation
parentc5bfe1303a59b92eb94371fee6a1078dd08b7309 (diff)
Fix for navmesh baking. Error message: Condition “!shapes.has(p_owner)” is true
Diffstat (limited to 'modules/navigation')
-rw-r--r--modules/navigation/navigation_mesh_generator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp
index 62db6ff4e9..0ae5bd42cc 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;