Hello,
I’m starting to develop a game where the character is made of multiple skeletal meshes.
The 4.11 release came with the Copy Pose From Mesh animation node, which is said in the release notes to be better than SetMasterPoseComponent.
But how to use that node? Here is what I did:
I created a new animation blueprint, where I get a reference to the root skeletal mesh during the initialization, and use that mesh as the argument to the CopyPoseFromMesh node in the anim graph:
In the construction script of my character, I create the various skeletal meshes, and attach the children to the main one, but I DONT call SetMasterPoseComponent.
In the blueprint of my character, I set the main animation blueprint to the root skeletal mesh, and assign the “child” animation blueprint to the children.
The editor crashes in the following class FAnimNode_CopyPoseFromMesh in the function Evaluate at the line:
OutPose[PoseBoneIndex] = CurrentlyUsedSourceMeshComponent.Get()->GetSpaceBases()[SourceBoneIndex];
with the assertion:
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 785]
Array index out of bounds: 0 from an array of size 0
But if I call SetMasterPoseComponent, I don’t get the same assert, and I can assign the child animation blueprint to the child skeletal mesh.
But now, I don’t get the point, because I can have exactly the same behavior by just using the SetMasterPoseComponent call.
So is CopyNodeFromMesh just meant to be used in addition to SetMasterPoseComponent, if and only if we need to play additional animations on the child skeletal mesh?
Thanks!