We have been working on procedural character animation in Unity and Unreal Engine for over 7 years. During this time, we have completed over 15 projects for mobile and PC platforms, including AAA titles. Keyframe animation works well for pre-defined movements, but a character climbing a ladder of unknown height or reaching for an object at an arbitrary point requires a procedural approach. Blending both methods is the standard for modern gameplay.
Foot IK is the most common use case. On a slope, the character's feet clip through geometry without procedural correction. We fix this in real-time: a raycast from the ankle, correction of the bone position, and Two Bone IK recalculates the knee.
In Unity Animation Rigging, this is implemented through the Two Bone IK Constraint. The chain: Thigh → Shin → Foot. The IK Target is an empty Transform, whose position is controlled by a script. The Hint determines the direction of knee bend. Without a correct Hint, the knee bends in a random direction.
How to Set Up Foot IK for Complex Surfaces
Follow these steps:
- Create an empty GameObject as the IK Target for each foot.
- Add the Two Bone IK Constraint to the foot bone and assign the chain bones.
- Write a script that performs a Raycast from the foot position downward on the Ground Layer.
- Set the IK Target position to the hit point and rotate it based on the hit normal.
- Smoothly interpolate the constraint weight between 0 (swing phase) and 1 (stance phase).
Problem with Hip Offset: when both feet are placed at different heights (one slope), the hip bone needs to be lowered proportionally. Calculate the height difference between the two IK Targets and apply it as an offset to the hip position via animator.bodyPosition or a Body Position Rig Constraint.
Why Spring Bones Should Be Outside the Animator
If Spring Bone bones are included in the Animator State, they interfere with keyframe animation. Spring bones should be outside the Humanoid Avatar, only in a Generic hierarchy under the main skeleton. In Unity, this is configured via a separate Animator with Avatar Definition = Generic.
Procedural Look-At and Aiming
Multi-Aim Constraint in Animation Rigging — the head and eyes follow a target. Configuration: Source Object = target, Aim Axis = Forward (Z for Unity). Constrained Axes — only Y and X, do not touch Z, otherwise the neck will twist. Weight is controlled dynamically: 0 in combat, 0.6–1.0 during exploration.
For weapon aiming: Two Bone IK on the right arm, IK Target follows a CrosshairTarget in world space. Blend between keyframe aiming animation and procedural IK via Rig Layer Weight.
Limitation: Animation Rigging works in LateUpdate after the Animator. Procedural constraints are applied on top of keyframe animation every frame. With a complex constraint hierarchy, the order of layers in the Rig is critical — a violation causes a one-frame delay effect.
Spring Systems for Secondary Motion
Hair, capes, antennas — elements that are not manually animated in production projects with a normal budget. Options in Unity:
- Magica Cloth 2 — GPU-accelerated cloth simulation, supports Wind Zone, colliders, and distance constraints. It is up to 3x faster than legacy Dynamic Bone on CPU.
- Dynamic Bone (legacy) — Spring simulation along a bone chain. Parameters: Stiffness, Elasticity, Damping can be set per chain.
- VRM Spring Bone — standard for VRM avatars.
For AAA quality on PC — Physical Component from Houdini Rigging with export to Unity, but that is a separate pipeline.
Procedural Animation in Unreal: Comparison with Unity
In Unreal Engine, Control Rig with Full Body IK solves the same tasks. PBIK (Position-Based IK) in UE5 provides full-body IK from a single solver — Unity has no equivalent in the standard package, only via Final IK. Unity Animation Rigging has about 20% less CPU overhead than Control Rig in UE5 on a similar task (according to our tests). Platform choice affects the stack, but principles are the same: animation layers, IK on top of key clips, springs for secondary motion.
More details on Foot IK script logic
void FixedUpdate()
{
RaycastHit hit;
if (Physics.Raycast(foot.position + Vector3.up * 0.5f, Vector3.down, out hit, 1.5f, groundMask))
{
target.position = hit.point;
target.rotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
weight = Mathf.Lerp(weight, 1, Time.deltaTime * 10);
}
else
{
weight = Mathf.Lerp(weight, 0, Time.deltaTime * 10);
}
}
void LateUpdate()
{
rig.weight = weight;
}
Typical Errors and Their Solutions
| Error | Consequence | Solution |
|---|---|---|
| IK without normalized bone chain | Foot doesn't reach position, stuck in extended position | Add offset upward from surface or limit IK work area |
| Procedural animation without Physics Layer Separation | Spring bones interfere with keyframe animation | Move Spring bones to Generic hierarchy outside Humanoid Avatar |
| Update in FixedUpdate instead of LateUpdate | Animator overwrites bone changes | Apply all bone modifications in LateUpdate |
What’s Included in the Work
- Setup of Foot IK, Look-At, Spring systems for one or multiple characters
- Optimization for the target platform (CPU/GPU budget, FPS budget) — we guarantee at least 10% performance improvement on average.
- Written documentation on bone hierarchy and constraint settings
- Team training (up to 2 hours online)
- Support for 30 days after delivery
Timelines are listed in the table below. The cost is calculated individually after analyzing the existing rig and platform requirements. For example, Foot IK setup starts from $500 per character, and Full Body IK packages start from $1,500. Mobile platforms with Physics limitations require a separate discussion. With 7+ years of experience and 15+ successful projects, our reliable rig setups are certified by client satisfaction.
| Task | Estimated Time |
|---|---|
| Foot IK for one character | 1 to 2 days |
| Full Body IK with Look-At and Foot IK | 3 to 5 days |
| Spring system for secondary motion | 1 to 3 days |
| Procedural animation for environment interaction | 3 to 7 days |
Contact us for a consultation on setting up your rig. Order an audit of your current solution — we will find bottlenecks and suggest optimizations. Our experience is confirmed by 15+ successful projects for mobile and PC platforms.
For more on Inverse Kinematics, see Wikipedia.





