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.
Why Does Game Character Rigging Often Break the Animation Pipeline?
The model is ready, textures are in place — but in Unity it stands like a wooden puppet. Bones are set arbitrarily and don't map to Humanoid Avatar. The programmer connects a ready-made Animator Controller from the Asset Store — animation blending breaks the pose because root motion is configured incorrectly. This is a typical situation where game character rigging was not designed for the engine from the start. An error at the rigging stage leads to hours of rework for the animator and programmer, and the project budget increases by 30–50%.
Rigging is not just "adding bones." It is designing a control system that must work within a specific engine with specific data format requirements. We guarantee that after our work, the character is ready for animation without rework: all bones map to Humanoid, weights are distributed without artifacts, and the Animator Controller is designed for the specific gameplay. Our team has been doing game character rigging for over 7 years and has completed work for 150+ characters in projects of various genres — from mobile RPGs to PC action games. Order rigging from us — and get a skeleton ready for animation from the first import.
What Are the Skeleton Requirements for Humanoid Avatar?
Unity works with two rig types: Generic and Humanoid. The choice affects the entire animation pipeline.
Generic rig — arbitrary bone hierarchy. Animations are tied to a specific model, retargeting is impossible. Suitable for non-character animation (vehicles, doors, creatures with non-standard anatomy).
Humanoid rig — Unity maps bones to a standard schema of 17 mandatory bones (spine, head, arms, legs) and up to 32 optional ones. After that, any Humanoid animation can be applied to any Humanoid character. This is the foundation for retargeting and Animator Controller with Blend Tree. Humanoid rig speeds up animation creation by 2–3 times compared to Generic, since ready-made animations from the Asset Store work without adaptation.
Errors that break Avatar mapping:
- Incorrect bone orientation. Unity expects the X-axis to point along the bone toward the child bone. If the arm points along Z or -Y — the Avatar will be generated with a distorted T-pose.
- Extra intermediate bones in the spine chain. If there is an unmapped intermediate bone between Spine and Chest — it gets lost during retargeting, spine animation looks stiff.
- Roll bones (twist bones) — bones for distributing forearm and thigh twist. In Humanoid, they must be added as additional (non-mandatory) bones with correct weight painting. Without twist bones, the forearm twists unnaturally when the hand rotates.
T-pose vs A-pose
Unity recommends T-pose as the bind pose. A-pose (arms down at ~45°) technically works, but retargeted animations will have small shoulder joint errors — up to 5° deviation. For characters with armor or broad shoulders, A-pose is sometimes preferable: less mesh stretching during retargeting. The decision is made at the rigging stage, redoing it later is expensive.
Avatar Mask
Avatar Mask is a tool for partial application of animations. For example: the lower body plays a run animation, the upper body plays a shoot animation. Without Avatar Mask, these states conflict. The correct Animator Controller structure for a shooter:
Base Layer (Full Body weight: 1.0)
└── Locomotion Blend Tree (idle / walk / run / sprint)
Upper Body Layer (Avatar Mask: upper body, weight: 1.0)
├── Idle_upper
├── Shoot
├── Reload
└── Aim_offset (2D Blend Tree by pitch/yaw)
Additive Layer (Avatar Mask: spine, weight: by parameter)
└── Lean_left / Lean_right
Example of Avatar Mask setup: in Unity Inspector, select Animator Controller, open Layers -> Add Layer -> choose Avatar Mask. For Upper Body, create a mask enabling shoulder girdle, arms, and head bones. For Additive, only spine. Uncheck the legs.
Additive layer for leaning is a typical optimization: instead of 8 separate animations (run_left, run_right, walk_left...), one additive lean is applied on top of any state. Time savings on clip creation — up to 40%. For complex projects, this reduces the animation budget by 15–20%.
How to Set Up a Blend Tree for Locomotion?
Blend Tree is a system for blending animations based on one or two parameters. For character locomotion, the standard is 2D Freeform Directional with parameters velocityX and velocityZ.
Minimum set of clips for basic locomotion:
| Animation |
velocityX |
velocityZ |
| Idle |
0 |
0 |
| Walk Forward |
0 |
0.5 |
| Run Forward |
0 |
1.0 |
| Walk Backward |
0 |
-0.5 |
| Run Backward |
0 |
-1.0 |
| Strafe Left |
-0.5 |
0 |
| Strafe Right |
0.5 |
0 |
Freeform Directional interpolates between clips by angle and magnitude of the velocity vector. At velocity (0.35, 0.35), Walk Forward and Strafe Right are mixed with weights calculated by distance to each point in 2D space.
Root Motion vs. In-Place Animations
Root Motion — character movement is driven by the root bone displacement in the animation clip. The animator "bakes" movement speed into the animation. Unity reads this displacement and moves the character Transform. Pros: animation and movement are always synchronized (steps match displacement). Cons: harder to control speed via code, requires correct setup in Animator (Apply Root Motion: true).
In-Place — the pelvis bone stays in place, movement is controlled by code (CharacterController or Rigidbody). Easier to integrate with physics systems, but risk of step-to-speed desynchronization (slipping feet).
In-Place animations with Foot IK via the Animation Rigging package (Unity) are better for games with complex terrain, as they ensure precise foot placement on uneven surfaces, saving 15–20% of time on manual animation correction.
Why Do Skinning Problems Occur and How to Solve Them?
Skinning (binding mesh to bones via weights) is the most labor-intensive stage of rigging organic characters.
Tools: Maya (Weight Paint tool + Component Editor), Blender (Weight Paint mode + Vertex Group Editor), 3ds Max (Skin modifier + Weight Table).
Problem areas and solutions:
| Problem |
Cause |
Solution |
Budget Savings |
| "Candy wrapper" artifact in armpits |
Default skinning solution |
Add corrective shape keys (blend shapes) triggered by shoulder angle |
90% reduction in artifacts |
| Knee/elbow twisting |
Missing twist bones |
Twist bones distribute deformation across three joints (shoulder twist, elbow, forearm twist) |
Eliminates "cylinder twisting" |
| Distortion during retargeting |
Incorrect bone orientation in T-pose |
Check via Unity Avatar Tester |
60% time savings on animation rework |
Proper skinning from the start saves up to 60% of the animation rework budget. — and we add weight math and blendshapes to make movements look natural. To avoid similar issues on your project, get a rigging consultation right now.
Combat Animations and States
A combat animation system is not just a set of clips. It is a state graph with transition conditions and interrupt priorities.
Typical mistake: transition from Idle → Attack with Has Exit Time: true and Exit Time: 0.9. This means the attack will start only when idle has played 90% (0.5 seconds). The player presses the attack button and waits half a second. Solution: Has Exit Time: false, transition by trigger, Interruption Source: Current State with priority.
Combat states structure:
Any State → Hit Reaction (trigger: onHit, interrupts current)
Any State → Death (trigger: onDeath, interrupts all)
Attack Layer:
Idle → Attack1 (trigger: attack)
Attack1 → Attack2 (trigger: attack, exit time: 0.6)
Attack2 → Attack3 (trigger: attack, exit time: 0.6)
Attack1/2/3 → Idle (no trigger, exit time: 1.0)
Combo-window opens at ~40% of animation length and closes at ~80%. This creates a sense of responsiveness without breaking the animation.
When Should You Use Spine 2D?
Spine is the standard for 2D animation in mobile RPGs, idle games, action-platformers. The character mesh is split into parts attached to a 2D skeleton. Animation — bone transformations, mesh deformation via weighted vertices.
Advantages over frame-by-frame:
- Animation file size is kilobytes instead of megabytes (spritesheets). Typical savings — 80–90% of build size.
- Retargeting: same attack animations work on different characters with identical skeleton structure.
- Animation blending and IK — same concepts as in 3D.
Integration in Unity: official Spine Runtime for Unity. The SkeletonAnimation component controls playback, SkeletonMecanim allows using Animator Controller on top of the Spine skeleton. For programmatic animation — direct control via API: skeletonAnimation.AnimationState.SetAnimation(0, "walk", true).
DOTween is often used in conjunction with Spine to control non-skeletal animations of UI elements attached to the character (health bar, damage numbers) — not for the skeleton itself, but for synchronizing UI with game events.
How We Work
- Analysis — examine gameplay, determine list of animations, rig type (Humanoid/Generic), IK and layer requirements.
- Skeleton design — create bone hierarchy in Maya/Blender considering Humanoid Avatar, add twist bones, corrective shapes.
- Skinning — manual weight refinement in problem areas, verification via Unity Avatar Tester.
- Animation creation — locomotion, combat, reactions, cinematics. Set up Animator Controller with Blend Tree and Avatar Mask.
- Testing and optimization — check in target scene, profile draw calls, eliminate stutter, configure asset streaming.
- Delivery — hand over project with documentation and support.
What You Get
- Skeletal model with correct Humanoid Avatar (or Generic) — FBX/glTF file.
- Set of animation clips — FBX with AnimationClips.
- Animator Controller with configured layers, Blend Tree, and transitions.
- Documentation on controller structure and code usage.
- Support during integration — we answer questions, fix inaccuracies.
Estimated timeline: 5 to 15 working days depending on complexity (number of animations, rig type, Spine 2D presence). Cost is calculated individually after scope assessment — contact us for consultation and a rough estimate. Order game character rigging — and your characters will come to life without animation bugs.