Hi everyone,
I’ve been working on a custom Inverse Kinematics (IK) system for character legs in Three.js, and finally got something that feels pretty natural.
The feet dynamically adjust to:
-
uneven terrain
-
slopes
-
stairs
Big challenges I faced:
-
reducing foot sliding
-
blending IK smoothly with animations
-
keeping stability on sharp edges
Still improving it, but I’m happy with the current result.

If you want to extend this, improve it, or drop it straight into your own project — go for it. Upper body IK, ramp normal correction, a live tuning panel — anything you think is missing, just build it. The code is there to be used.
Github: GitHub - Aditya02git/Leg-IK_In_ThreeJS_With_Rapier · GitHub
Demo: https://leg-ik-in-threejs-with-rapier.onrender.com/
And if you tried something similar or know a cleaner way to handle the incline jitter or ramp normals just drop it below, genuinely curious what you think.

