IKs make leg bend the wrong way... help please!

I’m using blender to export a character to UE4. I have a rig similar to the mannequin, but exported from Character Creator. All the roll axes seem to match up to the mannequin. When my friend the coder tries to add IKs to the legs, they bend outward instead of forwards. Any ideas why this might be happening?

You need to set the upvector for the leg, in the Two Bone IK node look for the joint target location, which in theory is the location of the knee, so make sure is properly set.