summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-05-31 12:30:10 +0200
committerGitHub <noreply@github.com>2021-05-31 12:30:10 +0200
commit4a9742457629af9c110e433cf15e83ab3aad05d1 (patch)
tree4c63ff8d7a5f1a7327167c608c7473e49dbcbf54
parentf0aa4e597ab0acc9d4ba124cdbcf6ab1fa1e544c (diff)
parent96fe795bdb3b2b91b4b09dff1692633493ff2be1 (diff)
Merge pull request #49182 from timothyqiu/parent-cache
Check cache_parent_physical_bone when rebuilding parent cache
-rw-r--r--scene/3d/skeleton_3d.cpp2
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();