To test it we switched UAnimSequence::ExtractRootTrack to look like
// we assume root is in first data if available = SkeletonIndex == 0 && BoneTreeIndex == 0)
if ((TrackToSkeletonMapTable.Num() > 0) && (TrackToSkeletonMapTable[0].BoneTreeIndex == 0) )
{
// if we do have root data, then return root data
GetBoneTransform(RootTransform, GetSkeleton()->GetReferenceSkeleton().FindBoneIndex("zero_joint"), Pos, false, false);
return;
}
instead of:
// we assume root is in first data if available = SkeletonIndex == 0 && BoneTreeIndex == 0)
if ((TrackToSkeletonMapTable.Num() > 0) && (TrackToSkeletonMapTable[0].BoneTreeIndex == 0) )
{
// if we do have root data, then return root data
GetBoneTransform(RootTransform, 0, Pos, false, false);
return;
}
which it is by default. The problem is, we start getting crashes in GetBoneAtomTranslation, seemingly randomly. We only have the one skeletal mesh in the level. There are two instances of it.
Is this something we can do, or should we not be using rootmotion, and write our own code to extract the delta translation from the joint.