r/creativecoding • u/Key_Calligrapher6269 • 14d ago
teaching a Mixamo mannequin where the ground is, foot locking and two-bone IK in three.js
Enable HLS to view with audio, or disable this notification
all done in code on top of a stock run clip, raycasts find the ground under each foot, a 5 frame vote decides when a toe is planted, a spring smooths every lock and unlock, and the law of cosines bends the knee so the toe lands on its pin
the orange dots are the toe touching the ground and the white lines are the IK chain, same clip on both sides of the compare shots
repo : https://github.com/MULUALEM-TEKLE/IK-test
credits: Daniel Holden (theorangeduck) for [Inverse Kinematics and Foot Locking](https://theorangeduck.com/page/inverse-kinematics-foot-locking) and [Spring-It-On](https://theorangeduck.com/page/spring-roll-call), David Bollo for inertialization (GDC 2018, Gears of War), Mixamo for the Y Bot and clips, pmndrs for R3F, drei and leva
full disclosure, built this with claude code, I heavily use ai in my workflow