mirror of
https://github.com/godotengine/godot.git
synced 2025-01-19 08:22:01 +00:00
Merge pull request #51798 from nekomatata/fix-skeleton-child-bones
This commit is contained in:
commit
b463ac747a
@ -172,13 +172,16 @@ void Skeleton3D::_update_process_order() {
|
||||
|
||||
parentless_bones.clear();
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
bonesptr[i].child_bones.clear();
|
||||
}
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (bonesptr[i].parent >= len) {
|
||||
//validate this just in case
|
||||
ERR_PRINT("Bone " + itos(i) + " has invalid parent: " + itos(bonesptr[i].parent));
|
||||
bonesptr[i].parent = -1;
|
||||
}
|
||||
bonesptr[i].child_bones.clear();
|
||||
|
||||
if (bonesptr[i].parent != -1) {
|
||||
int parent_bone_idx = bonesptr[i].parent;
|
||||
|
Loading…
Reference in New Issue
Block a user