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

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().
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?