Hi, is there a way to get bone positions from USkeletalMeshComponent
nodes that are obtained using USCS_Node
from UBlueprint
s? I have a hack that uses bone matrices from USkeletalMeshComponent::CacheRefToLocalMatrices(...)
but I wonder why does the USkeletalMeshComponent::GetBoneLocation(BoneName, EBoneSpaces::Type::ComponentSpace)
crash.
Ok, found a solution that works for my use case.
- Create a new
USkeletalMeshComponent
, assign theUSkeletalMesh
from theUSCS_Node
’sUSkeletalMeshComponent
. - Register it.
UWorld * World = GEditor ? GEditor->GetEditorWorldContext().World() : nullptr;
Component->RegisterComponentWithWorld(World);