I have been doing this recently with quaternions to control bone rotation, but the first step, how to access the bones in my skeleton tree in c++ code, I can not achieve, I would like to ask how to solve this problem, very urgent.thank you
Hello,
This is how you access the bones nodes of a skeleton:
USkeleton* Skeleton = MySkeletalMesh->Skeleton;
if (Skeleton != NULL)
{
auto Bones = Skeleton->GetBoneTree();
}
Though the GetBoneTree() function was marked DEPRECATED in 4.14, but should still work for now.
~ Dennis / MazyModz
USkeleton* Obj = LoadObject(NULL, TEXT(“Skeleton’/Game/StarterContent/Bones/Body/jg_Tpose_0_Skeleton.jg_Tpose_0_Skeleton’”));
if (Obj != NULL) {
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, TEXT("bone UPload Success !!! " + Obj->GetName()));
}
FString tem = Obj->GetName();
auto boneTree = Obj->GetBoneTree();
Hello, this is my code, tem=jg_Tpose_0_Skeleton, but boneTree is all None, what’s the reason