Hello, Unreal pros,
I’m trying to do some bone control in AnimInstance instead of AnimBlueprint to simplify the pipeline.
I use following code in a function to retrieve the bone index details:
FAnimInstanceProxy *curAnimInstProxy = &GetProxyOnAnyThread<FAnimInstanceProxy>();
FComponentSpacePoseContext compSpacePoseContext = FComponentSpacePoseContext( curAnimInstProxy );
const FBoneContainer& boneContainer = compSpacePoseContext.Pose.GetPose().GetBoneContainer();
FBoneReference rootBone;
rootBone.BoneIndex = boneContainer.GetPoseBoneIndexForBoneName( rootBoneName );
But it will crash instantly when I try it in Editor.
The GetPoseBoneIndexForBoneName() cause Segmentation Fault, while the input name is checked and valid.
Is there any misunderstanding about those API? Do you know how to retrieve this info correctly?
Thank you.