Download

Trying to hide a specific bone on an ACharacter

Hi, I’m new with UE4, and decided I would start with something simple, like hiding a bone. But it has proven more difficult than I originally intended.
I’ve tried:
Code:



USkeletalMeshComponent* SkeletalMesh = GetMesh();
SkeletalMesh->HideBone(SkeletalMesh->GetBoneIndex(FName(TEXT("lowerarm_r"))), PBO_None);

No sure what you exactly mean by “hiding a bone”. After inspecting USkeletalMeshComponent::HideBone, you can see it just removes physical objects (“simulated” objects) from PhysX – therefore it removes “bone” (and all objects down in the hierarchy with it) from ragdoll. I doubt it affects rendering (a visual part of skeletal mesh) in any way as it is much more complicated task. I remember days when it was needed when working on a game and it was solved by scaling down to zero bone transformations. Therefore vertices bound to those bones collapsed to a single point.