Bake constraints weird deformation

I have recieved a rigged character with animation i want to export as FBX but there are constraints on it. When i chose to bake animation and chose visual keying and clear constraints i get weird deformation. Anyone know what might be causing this and possible solution?

It is likely to be caused by uneven scaling in some of the bones.
The StretchTo constraint is probably being used in places.

Within Blender that’s not a problem, as the other constraints will balance things out. After baking and removing the constraints, the compensation provided by those constraints goes away, and uneven scaling will have unwanted effects on bones further down the skeleton hierarchy.

For export purposes, it can be safe to have uneven scaling on bones, as long as they don’t have any child bones beneath them.

If you have DEF bones that use Copy Transforms to get their positions from other bones in the rig, that constraint can be replaced by Copy Location and Copy Rotation constraints, without a Copy Scale constraint. The weight painting will need to be done with that in mind, so that things don’t get distorted.

This video covers most of the issues that you’ll encounter when exporting for game engines, and how to get around them.