Help retargeting custom rig to Mannequin

I want to retarget the rig of my character to use the same animations as the Unreal Mannequin. However, I can not seem to get the retargeting to work.

The limbs of my character becomes stretched and distorted and the root bone of my character target rig is not following the source rig. This include the rotation of the root bone as shown by the roll animations. The feet of the character seems to be sliding around in the idle animations.

Can you help me find the solution?

The character is made in Blender with the rig using Rigify which have been optimized for use in a game engine following tutorials from CG Dive.