Problem with twists bone in control rig.

Hi
I have a problem with creating a Basic IK.
I have a dinosaur model. I made a rig of it in Blender using AutoRigPro. When I export it, I set Primary bone to X and Secondary Bone to -Y.
Here’s what happens in the EU - it twists the bones:





I have set up the UE Primary and Secondary bone in almost every possible way.
What I’m going wrong?
Please help.
Thank you.

Try to check the primary and secendary Axis in your Basic IK node? Maybe u should maintain these two axis are along with the bone axis in this skeletal mesh