I've tried getting a solution to this for weeks but none of the threads I've found had any answers on them and no one on any of the forums has had a solution either. I assume this is some sort of bug? When I create a rig in blender and import it into UE4 all is good until I try to use the UE4 IK system. The IK in UE4 breaks my limbs, it seems to rotate the foot of my legs in a random direction (though it's consistent within the same rig, it never changes on a specific rig, only when changing rigs.)
I uploaded a video of my entire rig-making process which you can see here: https://www.youtube.com/watch?v=PoUv1CSYWyc&feature=youtu.be
There is also a screenshot of the issue here: https://i.imgur.com/OtdiACW.jpg.
I've tried setting the roll of all bones to 0, I've tried multiple different scaling options, I've tried every combination of bone axis orientation, the list goes on. I took the mannequin from UE4 and put it into blender. I then put it straight back into unreal and it worked as expected. When I took the mannequin from UE4 and used "orient bone rotation" or whatever the setting is to get a more presentable rig, the problem came back. Once I took the oriented rig from blender and put it back into unreal the bones snapped again. Also, I don't know if it is exactly the same but when I take the skeletal asset of a rig in UE4 and set the rotation of the foot to 0,0,0 it gets very close to the position it's in when the IK is applied, I think it might even be the same position. You should be able to recreate this issue if you make a rig the way I did in the video. I assume that I'm doing something wrong, but no one has been able to figure out what it is. According to everyone I've talked to about this, I'm doing everything correctly. So I've uploaded a video of the entire process. Either I'm doing something wrong or there is a bug related to blender or UE4.
If anyone has a solution I would be EXTREMELY grateful. I've been unable to advance my game animations due to this.