Merge pull request #49182 from timothyqiu/parent-cache
Check cache_parent_physical_bone when rebuilding parent cache
This commit is contained in:
commit
4a97424576
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue