Fix animations for modified bone structure

I feel like there should’ve already been a quick and easy solution for this but I couldn’t find anything let me know if I missed anything

Have you created a custom character, completely animated it and then realized you wired the bones incorrectly. Now when combining multiple animations (swinging a sword while walking) the sword disconnects from the characters hand.

I was given a custom character and a large set of animations and ran into this very issue. Couldn’t find a quick solution anywhere so here’s the one I put together.

Just specify a character that has the old bone structure, one with the new bone structure, and the animation you want fixed and it will instantly generate it for you.

RBXM
FixAnimationBoneStructure.rbxm (6.1 KB)

GitHub (Link with rojo)

It does this by calculating the relative position of each part for any given pose in the first model, then calculating the bone transformation needed in the 2nd model to have them line up.

Rules

  • All parts in each rig must have unique names
  • All parts in the old rig must share a name and size with a part in the new rig.
  • The root parts must be named “HumanoidRootPart”
  • The root of all bones must be the root part

Directions:

  • Update all the config variables in the ‘FixAnimationBoneStructure’ file
  • OldModel is the rig with the old bone structure
  • NewModel is the rig with the changed bone structure
  • OldKeyframeSequenceToFix is the keyframesequence you want updated to work with the NewModel
  • Press Run/Play
  • Copy the generated keyframe sequence
  • Press Stop
  • Paste the generated keyframe sequence

Known issue:

There appears to be some floating point rounding issues that compound the further down a bone structure you go I had one that was 6 bones deep (From the HRP) and it was off by 0.001 studs. I don’t plan to attempt to fix this.

1 Like