IK / FABRIK blueprint tutorial for proper foot placement with capsule collision

I think you changed because the Ik root bones, the blank template now doesn´t work because of it, the skeleton difference.

FeetIK Progress - TwoBoneIK

Been bashing my head against this thread all week, managed to get a decent start with Feet IK so Ill post my findings below.

Thanks to Rhythm and , you guys rock.


I first used the FABRIK nodes but wasn’t able to get any decent results. The best I managed still had the knees bending forward and sideways giving my Character broken legs. ;(

I read this from -

So when I learned that, I figured without PHAT constraints I wouldn’t be able to lock the joint rotation to prevent overbending (without editing the C++ code for FABRIK).

With that, I switched back to TwoBoneIK, but the default skeleton in UE4 doesn’t have the required bones I needed for the Right and Left knee pit.

So on the advice of Rythm -

I did just that. I added the forward vector of the capsule component to the location of the foot socket and offset the vector on the Z to give me a rough point in front of the characters knee.

Bit hacky but the effect worked without having to mess with the default skeleton.

Still have more work to do to fix the rotation of the foot and sell the overall effect, but this is my progress so far!

Also need to implement an animation function on n008`s advice and get the anim lerps off the tick -

My blueprints are exactly the same as with a slight alteration in the AnimBP to get the vector for the Right and Left knee, like in the image below

Implemented this on a ThirdPersonTemplate project in 4.10, all fine!

hello Rhythm.I 'doning FootPlacement with IK,And i also use box-trace to adjust foot Rotation,But how thest info to adjust Foot Rotation.

I see ANtlord did an update to 4.11. Any chance of seeing an update to 4.14?
How difficult would it be to compile and update the source myself? And if it’s not that hard, where can I dig to find out how to do that?

Thanks everybody involved & especially for the great info in this thread! I ran into the same ‘issue’ with the feet IK provided by the content example, managed to take from the first post what i needed (so far didnt implement knees, and seems to work fine) and some insight from the later posts, and got it working, i still gotta do some fine tuning and add feet rotation, but yea, really happy with what i got so far:

Hi guys, check out my new tutorial

Oh nice, ty Kheka, will go over that to see what i can take to improve my current setup :slight_smile:

Is anyone able to make a video tutorial on this?

Possibly. There were a few inaccuracies in this (original) tutorial that needed a few days work to sort out.

Either way the end result is far from what you can do with c++, and your character will almost always have a hitch in it’s step without custom animations and proper curves to apply the IK.
that’s the main reason I never published a tutorial…

At a base level, the skeleton IK bones should always be moving with the feet during animation - without having to force them via code.
once that happens, you need to transfer the curve front the bone of the foot’s Ball bone to a new IK curve.
possibly modify it a bit to make the IK only active after full contact to the ground. Either way the curve is a good starting place.

With said modified animation you can then start to work out how to apply the IK to the animation via nodes.
be it fabric or leg IK or whatever.
usually you want world space or local space.
World space works well since you can always calculate into world space by getting the actor or capsule location.

Once you sort out the IK nodes and how the applied, you can move on to coding up the actual calculations.
now that part is a bit more tricky.

the first thing that gets in the way is the character capsule collision.
because of the collision you have to move the character mesh around (usually down). And resize the capsule (so your head doesn’t get hit by stuff when it shouldn’t be hit).
To make that happen you just shift the pelvis bone down.

Then you apply the offsets from the foot collision calculations. At this point, in several cases the calculations will keep on happening causing jitter like effects. To fix that you need to come up with a way to only calculate the whole thing once until the character position changes or rotation occurs.
That’s pretty hard to do, since the idle animation itself can cause movement enough to cause a recalculation.

Anyway, that’s the applied theory.
the math behind it is quite fun. If you don’t know your pythagorean theorems look them up before you start. Also look up what Cross does, and what a Normal (vector) is.
With those in mind you can somewhat easily calculate the offsets needed.