You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #77265 from lyuma/aabb_bone_lod_inside
Fix calculation of skinned AABB for unused bones.
This commit is contained in:
@@ -534,7 +534,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
|
|||||||
|
|
||||||
if (skeleton->use_2d) {
|
if (skeleton->use_2d) {
|
||||||
for (int j = 0; j < bs; j++) {
|
for (int j = 0; j < bs; j++) {
|
||||||
if (skbones[0].size == Vector3()) {
|
if (skbones[j].size == Vector3(-1, -1, -1)) {
|
||||||
continue; //bone is unused
|
continue; //bone is unused
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -561,7 +561,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < bs; j++) {
|
for (int j = 0; j < bs; j++) {
|
||||||
if (skbones[0].size == Vector3()) {
|
if (skbones[j].size == Vector3(-1, -1, -1)) {
|
||||||
continue; //bone is unused
|
continue; //bone is unused
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
|
|||||||
|
|
||||||
if (skeleton->use_2d) {
|
if (skeleton->use_2d) {
|
||||||
for (int j = 0; j < bs; j++) {
|
for (int j = 0; j < bs; j++) {
|
||||||
if (skbones[0].size == Vector3()) {
|
if (skbones[j].size == Vector3(-1, -1, -1)) {
|
||||||
continue; //bone is unused
|
continue; //bone is unused
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -654,7 +654,7 @@ AABB MeshStorage::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < bs; j++) {
|
for (int j = 0; j < bs; j++) {
|
||||||
if (skbones[0].size == Vector3()) {
|
if (skbones[j].size == Vector3(-1, -1, -1)) {
|
||||||
continue; //bone is unused
|
continue; //bone is unused
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user