Weird animation import from blender

Hi everyone,

First of all I would like to say hello as it is my first time posting on the forums. Secondly, I have recently started testing some things out with Blender and UE4 and so far my experience has been quite hassle free. I have, however, appeared to have reached a problem. Basically I made a quick character in MakeHuman and started animating him. Each of my animations are in separate blend files and all work well, except for one. In my run cycle animation for some reason the animation plays perfectly in blender but when I export it in to UE4 the legs are rotated 90 degrees. I am quite new to all of this and at first I suspected bone roll values (I don’t even know if they can cause this) but on my novice inspection they don’t seem to be messed up.

Here are some images showing the problem:

Animation in Blender

Animation in UE4

Edit:

So after further testing I have come to the conclusion that it is something to do with the import to UE4. I’ve imported the animation back into blender after exporting it as an FBX and it still works perfectly, however, if I rotate the legs backwards 90 degrees in blender the animation looks really weird but when I import into UE4 it acts as if he is standing up straight and doing the animation perfectly. Can anyone shed some light on why for some reason as to why UE4 would rotate the legs exactly 90 degrees? And if anyone has a fix it would be nice to hea