I have a character that will be animated and then imported into Unity. My method will involve using Rigify and a separate game rig which will copy the Rigify’s Pose. After animating I will only export the character model and the game Armature but not the Rigify rig. The problem is that whenever it bakes the animation it would badly scale the head. To summarize:
Character Model --skinned to–> game rig --copy transformed constrained to deform bones–> Rigify rig
I’ve experimented baking the actions manually (with visual keying of course) before exporting and it's the exact same problem. The only way I could make the game rig get a proper baked animation is when I remove all parenting relations which is a problem because I need the parenting when I import it in Unity.
I experimented again but this time I baked the animation from a rig where all the bones that has no Parent relations (which was baked accurately) instead of the Rigify rig and now it’s still the same problem as the start.
Here the yellow armature that has proper parenting is where I want the action to be bake but it’s head is strangely stretching. The orange armature is how the baked animation should look like which is the armature that has no parenting whatsoever. The legs and arms are a bit off but it’s not that much of a problem.
I've already tried a lot of things. At this point I suspect that this is a limitation of Blender where it can't bake animations properly when constraints and scaling of the parents are involved which is often the case with Rigify.