diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index 44c9dc714c0..585ed5ff96c 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -534,7 +534,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { if (skeleton->use_2d) { for (int j = 0; j < bs; j++) { - if (skbones[0].size == Vector3()) { + if (skbones[j].size == Vector3(-1, -1, -1)) { continue; //bone is unused } @@ -561,7 +561,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { } } else { for (int j = 0; j < bs; j++) { - if (skbones[0].size == Vector3()) { + if (skbones[j].size == Vector3(-1, -1, -1)) { continue; //bone is unused } diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index b91e73c8858..d3c22e4826c 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -627,7 +627,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { if (skeleton->use_2d) { for (int j = 0; j < bs; j++) { - if (skbones[0].size == Vector3()) { + if (skbones[j].size == Vector3(-1, -1, -1)) { continue; //bone is unused } @@ -654,7 +654,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) { } } else { for (int j = 0; j < bs; j++) { - if (skbones[0].size == Vector3()) { + if (skbones[j].size == Vector3(-1, -1, -1)) { continue; //bone is unused }