Calling HideBoneByName on a bone causes that bone (and all it's children) to be translated to the parent bone's location. This code in UpdateRefToLocalMatricesInner is responsible:
bool bNeedToHideBone = BoneVisibilityStates[ThisBoneIndex] != BVS_Visible;
if (bNeedToHideBone && ParentIndex != INDEX_NONE)
{
ReferenceToLocal[ThisBoneIndex] = ReferenceToLocal[ParentIndex].ApplyScale(0.f);
}
This breaks any verts that are skinned to the hidden bone. The more desirable behaviour would be for the hidden bone to remain in the same position, but for just the scale component to be set to zero. This could be done as follows:
bool bNeedToHideBone = BoneVisibilityStates[ThisBoneIndex] != BVS_Visible; if (bNeedToHideBone && ParentIndex != INDEX_NONE) { if (BoneVisibilityStates[ThisBoneIndex] == BVS_ExplicitlyHidden) { ReferenceToLocal[ThisBoneIndex] = (FMatrix44f)ComponentTransform[ThisBoneIndex].ToMatrixWithScale().ApplyScale(0.f); } else { ReferenceToLocal[ThisBoneIndex] = ReferenceToLocal[ParentIndex].ApplyScale(0.f); } }
We will need to gate any change like this behind a cvar to avoid behaviour changes for projects relying on the current behaviour.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-220481 in the post.