Skip to content

Commit

Permalink
Merge pull request #65775 from smix8/navigation_baking_disabled_shape…
Browse files Browse the repository at this point in the history
…s_4.x

Exclude disabled StaticBody CollisionShapes from Navigationmesh baking
  • Loading branch information
akien-mga committed Sep 14, 2022
2 parents bbed0b4 + 534ff93 commit 56fb2d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/navigation/navigation_mesh_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans
for (uint32_t shape_owner : shape_owners) {
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;
Expand Down

0 comments on commit 56fb2d1

Please sign in to comment.