Skip to content

Commit

Permalink
Merge pull request #49182 from timothyqiu/parent-cache
Browse files Browse the repository at this point in the history
Check cache_parent_physical_bone when rebuilding parent cache
  • Loading branch information
akien-mga authored May 31, 2021
2 parents f0aa4e5 + 96fe795 commit 4a97424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/3d/skeleton_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4a97424

Please sign in to comment.