Rigging leg with IKTwoBone in UE5.1 makes leg look twisted up and crimped

I’m rigging a 3D model for my first time. When I plug my model’s thigh, calf, and foot into an IKTwoBone function it makes the leg look all twisted and crimped. I’m using Unreal Engine 5.1. How do I get this to look the way it did originally while using IKTwoBone to rig the leg? Any help or suggestions at all are greatly appreciated; I’m desperate to solve this issue.

Broken version ^

The way it’s supposed to look ^

My setup ^

Generally speaking, you need a Pole to be able to do leg IK without twisting obscenely.

Also, it just looks like the leg is getting twisted 180 or more around. Could be a rotation issue OR bad weight paint. hard to tell from the image.

1 Like

Your help is very appreciated. I have a pole for the aim of the knee but no matter how I try to move or twist it it still looks bugged out. The actual motion of the leg using the IKTwoBone seems to work as intended (moving the foot also bends the knee, moving the knee control aims the knee at the control properly) but it still looks squished up. I’m following this tutorial: (8) How to Animate Characters in UE5 - YouTube and the part I’m stuck on is at 25:24 in the video.

Here are some different angles of the bugged out leg:


If you want any specific angles or details at all just let me know. I really appreciate your help. I’m so desperate for a solution.

This could be an issue with your skeleton.

Basically what you see oj the right leg is a candy wrapper effect due to over rotation.
As if the bones are flipped 360deg plus whatever the IK is computing.

The other leg just looks like bad paint. Unrelated parts being pulled by the rotation?

1 Like

I’m gonna rebuild the skeleton and retry, I’ll let you know how it goes. All of the pictures of a twisted leg are of the same leg (I haven’t plugged the other leg into an IKTwoBone yet). Thank you so much for your help again, I appreciate your responses very much.

It may be an issue with skeleton’s joint axis. It will be easier to debug when we see joints and their orientation. Before applying rig (aka in reference pose) and after.

When building skeleton there are some conventions that UE likes to use. Like forward axis of a joint (axis that looks to it’s child joint) should be X-axis. If it’s not you’ll need to correct parameters for that (I’d say it’s a bad practice though)

1 Like

So, if I have y axis as forward it would cause a problem? If that’s the case, then I think that might be the reason for the issue I’m having. Thank you very much for your response. I still haven’t had a chance to rebuild the skeleton. I think I originally built it and then exported it from Blender as y axis as forward, so I’m pretty confident that that’s the issue. I’m not sure that these pictures are helpful or what you were looking to see so let me know if I should send more pictures, but here is a picture of the knee joint orientation before and after plugging in the IKTwoBone to the graph:


Unrigged^


Rigged^

Something definitely seems weird, but I don’t know enough about rigging to have a clue what it is. I’ll try rebuilding and reexporting the skeleton as x axis forward and see if that works, and I’ll get back to you as soon as I find out. Thank you so much for your help.

1 Like

Yes, that seems to be the issue here. Notice how in Rigged picture the joint is forced to orient X as forward. This behaviour can be tweaked in IKTwoBone node with parameter ‘Primary Axis’. Currently it’s set as X. Try to set it to negative Y (0,-1, 0) because this seems to be your reference pose’s forward axis for that joint. Secondary axis should be negative X then, but you may want to fiddle with that a bit.

But, the best solution still would be to reorient joints as UE prefers them in your DCC.

Hope this helps :slight_smile:

1 Like

That did the trick! I just screwed around with different combos of x and y in both primary and secondary until I got one that worked. Everything looks good and is functioning properly :smiley: Thank you so much for your help!

1 Like

No worries :slight_smile:
Although, it’s a bit concerning that primary axis is the same as secondary. Hope that wont be a problem later down the line. Just keep it mind if something weird starts happening, haha xD

Cheers~

1 Like

I wonder…
Technically a leg (really most if not all joints) only has one axis of movement so i kinda doubt you need the secondary value set…

1 Like

That is true for the knee joint, but Leg-Torso connection is more of a ball socket type rotation, and IK effector’s location should control that as well.

The setting on the 2 bone node should only be relative to the main joint.
Not the attachment (thigh) joint.
Nor the end (foot) joint.

This all depends on how the beast needs to move anyway.
Since its not precise anatomy theres nothing to say that his/her knee joints dont allow 3 axis of alien impossible movement :stuck_out_tongue:

2 Likes