Two-Bone IK Setup for Third Person Character - Problems

So I recently ran into an issue after setting up the Two-Bone IK on the third person sample character.

The IK setup is identical to that of the example IK character in the Content Examples project.

The problem is visible in the image I’ve attached - the problem is exhibited when the character has only one foot IKed - what happens is that the other foot does not fall and you get a situation like that in the image.

If you tune the raycast distance to go below the foot of the third person sample character, as it is with the trench-coat guy set up with IK, the feet hover over the ground.

If you tune it so the raycast ends right at the feet, you get the situation in my image.

Here’s a thread another user posted about the same problem.

As you can see in the image here, the left foot is IKing up, but the character is still at whatever height the collision capsule puts him at.

There was some speculation in the linked thread that the IK setup isn’t working right with the third person sample character because it has the capsule collision.

Hi
Tell me, did you solve the problem?

I haven’t actually gone back to the issue, but I think it’s because of the capsule component stopping the character.

But at that point - I’m unsure how you would set up the character to have movement collision AND properly handle the IK situation for the feet.

Any advice on that is much appreciated.

we are having the same issue, but found that if we move the player mesh inside the mycharacter blueprint to a height were our feet better connect with the ground that the feet work correctly. the problem is making it do it correctly.
so you don’t end up with duck feet.

eg- you do it using the blueprint instead of setting height in component. but you have to set it in relation to the foot IK trace.

the stock content example IK is a badly made one. designed just to show off what IK can do. not how to make it work correctly.

Update on our efforts, We built an IK setup from scratch for our character entirely within the animation blueprint, we are using Anim notify events to tell our IK bone when to activate and de-activate. this lets us fine tune exactly when we want our feet to stop and start moving again with relative smoothness.

In addition, in the Details tab of the Two bone IK node, you need to set the end effector (your foot) to “World Space” that way it will use world location instead of component or bone space, which do not allow correct IK behavior.

Rough guide to what spaces to use for IK setups:

  1. Component: interacting with things inside your characters component tab.
  2. Bone: interacting with other bones in your character rig
  3. World: interacting with the environment

That’s not to say that IK wont work in these spaces, but you should probably use the right space for your IK setup.
(this is why the IK setup in the content example only works on things that move above the capsule floor, below that is out of range, it can’t actually move below that at least not normally.)

We use a layered blend per bone in the anim graph to blend the IK into the regular walking animations because, using the alpha on the IK bone node seems to not have a good outcome.

This lets us snap our limbs to the ground and have them stick correctly. however we are still having trouble when our parent bones pull the IK root too far causing feet to leave their desired location. I think we are close to solving that issue by using a bone transform node to move our hips closer to the foot furthest away.

If you would like more detail than that, give me a yell and Ill see if I can send pics of the blueprints.

(warning requires quite a few variables and we built some functions to clean up our blueprints because they got quite messy :smiley: )

(note Im a beginner at UE4 but that’s roughly what I figure is going on. could be wrong, could be right.)

WOW! Of course, to submit as much information. You can email to: kikis9@yandex.ru And how they behave legs when picked up stairs?

It sounds amazing! I’d love to see this setup in more detail. Could you perhaps post it here, so the rest of the community may be able to use it as well in the future?

Your IK setup entirely inside the AnimBlueprint sound interesting. I am an animator and i feel like the tutorials and templates such as the TPBlueprint are aimed at much lower quality projects. Ive been trying to get an IK setup working but havent succeeded yet. Is it possible for you to Email me some pictures of your IK setup for reference? My Email address is “jtsclongmire@gmail.com”.

Thanks in advance

I’ve made a post here about my solution to it:

Essentially you just calculate the farthest distance that the mesh would have to move for both feet to touch the ground, and then set its displacement of the model to that distance. The forum post has links to downloads that can demonstrate this and provides solutions to various issues that I found in the process of making it.

It still has a few minor problems, but it at least gets it working.

For anyone still working on this, forum user nabiul has made a thread with blueprint screenshots explaining how to move the mesh downward a correct amount to overcome this problem.

There’s nothing wrong with your IK system… simply it’s one word: (Capsule) !! yeah … haha … the capsule collider is not giving the legs the free climbing and falling look while it stands in the middle of them down low :wink: adjust the mesh Z location according to capsule… shift it up a little … it will not dive in the floor anyway as long as you have a correct IK foot placement :wink: cheers.