1
$\begingroup$

Note: Baking the animation might not be the right thing for me to do - but from all my internet searches it seems right.

Problem: I have a character model and a weapon model which I need to move together. The weapons have a "child of" constraint, which works fine in Blender. When I export it as an FBX and pull it into Unity or onto Sketchfab, the character moves and the weapons are static.

Where I am now: I'd read that you have to "Bake the Action" for the child of constraint to be included. However, when I do that I get a weird behavior where it seems to only copy the arms and the weapon. After I run this, all leg key frames are gone from all of my animations. See below for an example of the same run animation after baking:

enter image description here

To Bake the pose, I did the following:

  1. Entered Pose Mode
  2. Set the Animation/Action to Run
  3. Selected All the bones
  4. Opened the Pose > Bake Action Menu
  5. Checked "Only Selected Bones" and "Clear Constraints"

enter image description here

This is the correct animation before baking:

enter image description here

$\endgroup$
2
  • $\begingroup$ What are you trying to export as? FBX? $\endgroup$
    – James
    Commented Nov 11, 2021 at 16:03
  • $\begingroup$ Yes, I am exporting FBX. $\endgroup$
    – Yecats
    Commented Nov 11, 2021 at 19:13

1 Answer 1

1
$\begingroup$

You need to check the Overwrite Current Action option in the bake dialogue otherwise it overwrites your whole animation with just the baked actions (yes, this option could do with a different label because it seems to do the opposite).

Ticking this option inserts the keys into your current animation, however it doesn't always work as expected so backup before you do it.

A better setup for what you were doing would be to create an empty, and under 'relations' set it to be a child of the hand you want the weapon to be in and set all the position and rotation transforms to 0.

Then just parent your gun to it by selecting the gun and then the empty, Ctrl + P with Keep Transform. This setup works fine in Unity.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .