IKFootPlacement
August 20, 2025 · View on GitHub
IKFootPlacement is a free C# script for Unity engine that controls the position and rotation of character’s feet, relative to the ground beneath. The script supports characters with any number of legs, which means it does not require the usage of a humanoid avatar. Instead it works with the use of Two Bone IK Constraint provided with the the Animation Rigging package from Unity.

Features
- No need to use humanoid avatar,
- Support any number of legs on a character,
- Has multiple parameters to controls the script,
- Uses IAnimationJob interface for better optimisation,
- The IKSetup script provides a quick and automatic configuration.

Repository Contents
The repository includes the following C# scripts:
-
IKFootPlacement.cs
A MonoBehaviour class that casts a raycast to detect the ground surface and passes the necessary information to the iKFootPlacementJob struct, -
IKFootPlacementJob.cs
An IAnimationJob struct that calculates and applies the position and rotation offset for each foot, -
IKSetup.cs
A MonoBehaviour class that automates the configuration of the IKFootPlacement script on Your character, simplifying the setup process, -
Other, additional scripts.
Requirements and Dependencies
- Unity Engine: version 2020.2.0 is a minimum; version 2021.2.4 or higher is recommended,
- Animation Rigging package: version 1.0.3 is a minimum; version 1.1.1 or higher is recommended.
Installation
You can download and install this package in one of two ways:
-
Download as a custom git package:
-
In Unity engine open the Package Manager window,
-
Press the + icon in the top left corner,
-
Choose
Add package from git URL..., -
In the text field type:
https://github.com/plonkabartosz/IKFootPlacement.git
-
-
Download from the Unity Asset Store:
- The asset is also freely available on the Unity Asset Store: IKFootPlacement - Free IK Script
Usage
-
Attach the IKSetup script to Your character:
- Create an empty scene,
- Add Your character to the scene,
- Make sure the character has an Animator component attached,
- Attach the IKSetup script to Your character,
- Follow the instructions shown in the Inspector tab,
- Begin setup by pressing
Start Setupbutton, - If done properly You can remove the IKSetup script.
-
Bake the animation onto IK controls: Use software like Blender, Autodesk Maya, etc. to bake the animation onto the newly created IK Controls.
You may also use (but not recommended due to bad retargeting quality) the
Bidirectional Motion Transferfunctionality that is a part of Animation Rigging package. You will find more information in the Animation Rigging package Manual. -
Configure the Script:
After adding the IKFootPlacement script, adjust it's parameters in the Inspector according to Your character’s setup. -
Run the Scene:
When you run the scene, the script will cast rays beneath the character’s feet, calculate the appropriate offsets using theiKFootPlacementJoband adjust the IK controls in real time.
License
This project and it's contents are distributed under the MIT License open source license.
Video Presentation
You can watch the video presentation of this script here: LINK