Exclude disabled CollisionShapes from Navigationmesh baking

Excludes disabled CollisionShapes from the geometry parsing for the NavigationMesh baking.
This commit is contained in:
smix8 2022-09-14 10:41:33 +02:00
parent f6b36f54e5
commit 534ff93b05

View file

@ -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;