How to Implement Foot/Leg IK in Godot 4.4?

Godot Version

v4.4.1.stable.official [49a5bc7b6]

Question

Hello,

I’m working on a 3D project in Godot 4.4 with a fully rigged bipedal character. All animations (walk, run, idle, etc.) are implemented and driven through a state machine inside an AnimationTree. The state machine isn’t perfect, but it works well enough for now.

I’m currently trying to implement a more advanced foot IK system to enhance realism and responsiveness, especially on uneven terrain or narrow surfaces. My goal is to blend animation with procedural IK in a way that feels grounded and adaptable.

What I’m Trying to Achieve:
I’m aiming to build a working IK system for the feet and legs so they can respond naturally to uneven terrain. I understand that for full realism, additional elements like pelvis height adjustment and body leaning would need to be integrated. For now, I’d be happy just getting the feet rotation and leg height adjustments to react properly to changes in terrain height and slope angle.

The main issue is that most of the available information is either outdated (often from the Godot 3 era) or too fragmented to follow. I’ve also tried learning from how others implement foot IK in engines like Unreal or Unity, but translating those workflows into Godot, especially in version 4.4, has proven extremely difficult without a clear, engine-specific implementation path.

Without a structured, up-to-date guide, it’s nearly impossible to piece together something functional without investing an overwhelming amount of time. That’s why I’m looking for a working starting point or example that shows how this can be done specifically in Godot 4.4 or any 4.x version.

I also have a small proof-of-concept script I hacked together just to show I’ve been actively trying to get foot IK to work. But I didn’t include it here to avoid bloating this post unnecessarily. The script is a basic SkeletonModifier3D that uses raycasts to place the feet on the ground by adjusting bone positions based on terrain height using base types like Vector3 and Transform3D. However, it doesn’t really work. It’s messy, outdated, and doesn’t seem scalable for a proper IK system.

I’ve also attempted to implement a slope detection system in code, mostly by piecing together very outdated information shared by others. My goal was to use raycasts to detect the ground angle and have the character’s feet or legs respond accordingly. However, all I could manage was making the entire character tilt or shift instead of just the legs, or ideally, only the feet reacting to the slope.

I haven’t touched the project in a while because I hit a wall with this. Now, I’d really like to restart the IK approach from scratch and do it the right way. That’s why I’m turning to this forum. Any help or guidance would be greatly appreciated.

I’m aware that many productions, even larger ones, skip foot IK entirely. But since I’m working on a grounded and reactive movement system for a long-term project, I’d love to take the time to get this right or at least set up a solid foundation to build on later.

Thanks for reading, and any help or insights are welcome

1 Like

Did you make any progress on this? Running into similar issues

I tried foot IK mixed with animation - i setup the IK foot to follow the animation and then used the IK foot solution instead of the animation - the problems i encountered included 1) flickering/jiggling IK solutions, 2) the lack of any ‘knee target’ caused the legs to break and bend at weird angles.

There is an advanced animation controller project that has an implementation for the feet sticking to uneven ground - its not perfect and the pose can tend to look unnatural, but maybe its ok with a character model after tweaking.

I came across this today, I haven’t personally done any IK work, but this person’s project is a robot spider procedurally animated in Godot with the capability to naturally transfer between differently aligned planes while walking, like floor to wall, and I think there’s a walking-over-a-dome kind of test at the end too.

1 Like

Yeah … not bad … I think the method might not work in godot 4.3+ because various nodes were deprecated.

Theres a PR open that includes long chain IK … the method allows full body IK for humanoids and whatever …
Im just hoping it gets compiled into the next godot release

1 Like

Actually i think this would be a step in the right direction (cough)

However it wouldnt quite supply full body ik and implementing footsteps would be difficult too.

1 Like

Im in the middle of updating my ik node plug in to be sutable for this and should have a tutorial done for it in the coming weeks.

The plugin is called OSIK and its part of the asset library.

Will let you know once i have the tutorials done up but feel free to play with it. Let me know if you need a link

1 Like