Merge pull request #77265 from lyuma/aabb_bone_lod_inside
Fix calculation of skinned AABB for unused bones.
This commit is contained in:
commit
05ddc822fb
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue