I’m having a lot of trouble trying to figure out what the Primary and Secondary axes (shown in the function) can be, I followed tutorials but none helped me in this case, I still can’t find out what values these should be.
Is it possible that there’s a problem in the mesh/skeleton itself? If so, how can I fix it? This case specifically is a skeleton from the marketplace.
Well, when I have some free time, I will try to export the skeletal mesh from engine and then attempt to rig it again in Blender. I’m not sure if it will work, but at least I can take a closer look at the problem and try to find a solution.
This post is quite old, but I am bringing it back to life with the hope of helping someone.
I had the same issue, my basic IK was breaking the skeleton and everyone in tutorials seemed to input the same axes blindly without giving explanations. This video by AskADev opened my eyes. Turns out something was wrong in the orientation of the bones in my rig: the Y axes were not coplanar, so a secondary axis could not be defined univocally for the bone chain. In particular:
the X axis of each bone should point to the next bone in the chain (or to the exact opposite direction)
the Y axis of each bone should lay on the plane defined by the positions of each bone in the chain itself.
With these conditions, a primary axis of (1,0,0) or (-1,0,0) and a secondary axis of (0,1,0) should work smoothly.
So the best way to fix this is to review your original rig in Blender/Maya and fix the orientations. An alternative that does not require another software is building some sort of axes-agnostic IK solver in your control rig.
Thanks DrSiro for your update.
There are tools within Unreal that aren’t always shown, or overlooked, but one that is VERY handy is to turn on the display axes on selection, option shown here
I tend to up the axes scale, as I can’t see real well . Now, when you select the bone/joint in your hierarchy, it’ll show you the correct orientation. In this particular model, you can see the orientation, X is pointing down the chain(+), and the Z is the “rotational” direction. Riggers will change the up axis depending on the direction they wish to change it.
Also, the IKTwoBone is much more user friendly and takes care of some of the odd math that happens under the hood. Try it out!