diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-05-29 15:34:55 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-05-29 15:34:55 +0800 |
commit | 96fe795bdb3b2b91b4b09dff1692633493ff2be1 (patch) | |
tree | 46f6f73235eb01363c1bb3f13e8ef72f1702fb33 /scene | |
parent | b63f9b59615a4a63f1a45564d78243a2929c3c03 (diff) |
Check cache_parent_physical_bone when rebuilding parent cache
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/skeleton_3d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 93f7dbcd91..82927df5f1 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -698,7 +698,7 @@ void Skeleton3D::_rebuild_physical_bones_cache() { const int b_size = bones.size(); for (int i = 0; i < b_size; ++i) { PhysicalBone3D *parent_pb = _get_physical_bone_parent(i); - if (parent_pb != bones[i].physical_bone) { + if (parent_pb != bones[i].cache_parent_physical_bone) { bones.write[i].cache_parent_physical_bone = parent_pb; if (bones[i].physical_bone) { bones[i].physical_bone->_on_bone_parent_changed(); |