Skip to content

Commit e62f57f

Browse files
authored
Merge pull request godotengine#70904 from huangjiaminhhh/master
Fix for navmesh baking when parsing StaticBody colliders
2 parents c2790ec + dbdcc8e commit e62f57f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/navigation/navigation_mesh_generator.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans
207207
List<uint32_t> shape_owners;
208208
static_body->get_shape_owners(&shape_owners);
209209
for (uint32_t shape_owner : shape_owners) {
210+
if (static_body->is_shape_owner_disabled(shape_owner)) {
211+
continue;
212+
}
210213
const int shape_count = static_body->shape_owner_get_shape_count(shape_owner);
211214
for (int i = 0; i < shape_count; i++) {
212-
if (static_body->is_shape_owner_disabled(i)) {
213-
continue;
214-
}
215215
Ref<Shape3D> s = static_body->shape_owner_get_shape(shape_owner, i);
216216
if (s.is_null()) {
217217
continue;

0 commit comments

Comments
 (0)