# Issues with bone transform updates in UE 5.6 IK Retargeter (Pelvis Motion Op) 

**URL:** <https://forums.unrealengine.com/t/issues-with-bone-transform-updates-in-ue-5-6-ik-retargeter-pelvis-motion-op/2679971>\
**Category:** Character & Animation\
**Tags:** retarget, unreal-engine, CPP, question\
**Created:** [November 29, 2025, 5:05am UTC](https://forums.unrealengine.com/t/issues-with-bone-transform-updates-in-ue-5-6-ik-retargeter-pelvis-motion-op/2679971 "2025-11-29T05:05:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![1c30571e2b064938bbc7af7f16ee2c02](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1c30571e2b064938bbc7af7f16ee2c02](https://forums.unrealengine.com/u/1c30571e2b064938bbc7af7f16ee2c02)\
**Post date:** [November 29, 2025, 5:05am UTC](https://forums.unrealengine.com/t/issues-with-bone-transform-updates-in-ue-5-6-ik-retargeter-pelvis-motion-op/2679971/1 "2025-11-29T05:05:18Z")

</div>

In the UE 5.6 IK Retargeter, I noticed that several bone transforms are not updating correctly within the Pelvis Motion operation stack.

![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/a/b7a63ee63a1d6e7be019328c1222e04295ce2a91.gif)

I identified the root cause in the FRetargetSkeleton::GetCachedEndOfBranchIndex() function.  
When the Pelvis Motion operation runs (inside FIKRetargetPelvisMotionOp::Run()), it attempts to update the target pelvis and its children’s transforms using FRetargetSkeleton::SetGlobalTransformAndUpdateChildren().  
To do this, the function retrieves the ChildBoneIndices array via FRetargetSkeleton::GetChildrenIndicesRecursive().

```cpp
CachedEndOfBranchIndices[InBoneIndex] = INDEX_NONE;
const int32 StartParentIndex = GetParentIndex(InBoneIndex);
int32 BoneIndex = InBoneIndex + 1;
int32 ParentIndex = GetParentIndex(BoneIndex);

// if next child bone's parent is less than or equal to StartParentIndex,
// we are leaving the branch so no need to go further
int32 BoneIndexAtEndOfBranch = RETARGETSKELETON_INVALID_BRANCH_INDEX;
while (ParentIndex > StartParentIndex)
{
	BoneIndexAtEndOfBranch = BoneIndex;
	BoneIndex++;
	if (BoneIndex >= NumBones)
	{
		break;
	}
	ParentIndex = GetParentIndex(BoneIndex);
}

// set once (outside of while loop above) to avoid potential race condition
CachedEndOfBranchIndices[InBoneIndex] = BoneIndexAtEndOfBranch;

```

The problem lies here: Using data from the `CachedEndOfBranchIndices` array to create the `ChildBoneIndices` array causes an issue. If a child of a higher-level bone is interleaved among the child bones, the loop terminates prematurely. As a result, subsequent child bones located after that index are not added to the array, preventing them from being updated.

Is there any way to solve this issue other than creating a custom retarget operation?
