Skip to content
theory · animation · biomechanics

Place the hand, preserve the body,inverse kinematics.

Inverse kinematics turns a desired hand, foot, or body contact into a joint pose. The endpoint is only the beginning: believable motion also requires reachable targets, stable bend planes, anatomical joint frames, coordinated shoulders and pelvis, persistent contacts, and a surface that deforms with the skeleton.

A target is not a pose

Many joint configurations can place an endpoint at the same target. A useful solver must choose among them while respecting bone lengths, preferred posture, joint limits, balance, collision, and contact.

  • Reach — solve without stretching the skeleton.
  • Posture — preserve stable elbow and knee direction.
  • Contact — keep planted hands and feet planted.
Target poseInput
Joint poseOutput
Fixed bonesCore rule
Believable motionGoal

Start here

What inverse kinematics solves

Kinematics describes motion without first asking which forces produced it. In a skeleton, forward kinematics starts with joint transformations and follows the hierarchy outward to calculate where each body part ends up. Inverse kinematics, usually shortened to IK, begins with a desired endpoint or set of endpoints and searches for joint transformations that reach them.

The endpoint may be a hand gripping a ledge, a foot planted on uneven ground, a head looking toward a subject, or several contacts acting at once. The desired position and orientation are commonly called the target or effector.

IK is usually underdetermined. An elbow beside the torso and an elbow behind it can place the same hand at the same point. A mathematical solution is therefore not automatically a useful pose. A practical solver also needs:

  • fixed segment lengths;
  • a preferred or reference posture;
  • joint rotation limits;
  • a stable bend direction for elbows and knees;
  • rules for unreachable targets;
  • orientation and twist constraints;
  • collision and contact handling; and
  • priorities when several effectors compete.

This leads to the central rule of character IK: placing the endpoint is only one constraint among many. A hand that reaches a wall through an impossible shoulder pose is not a successful human-motion solution.

Reachable does not always mean feasible

For a two-segment chain with lengths a and b, a target at distance d from the root is positionally reachable only when |a - b| <= d <= a + b. That test does not account for joint limits, preferred posture, collisions, or whether the rest of the body can support the pose. A point can sit inside the chain’s geometric reach while remaining infeasible under the complete character model.

When a target is outside the feasible region, the system should clamp or project it to a valid position, move a permitted root such as the shoulder or pelvis, or report the remaining residual error. It should not silently lengthen a bone.

Algorithms

Choosing a solver

There is no universal best IK algorithm. Solver choice follows the structure of the rig, the number of contacts, the constraints that must be enforced, and the available frame-time budget.

Analytic two-bone IK

Arms and legs are often modeled as two primary segments: upper arm and forearm, or thigh and lower leg. An analytic solver uses geometry to produce a direct solution:

  1. Measure the root-to-target distance and clamp it to the chain’s valid reach.
  2. Establish a bend plane using a pole or preferred direction.
  3. Use the segment lengths to locate the middle joint in that plane.
  4. Orient the root and middle joints toward the solved positions.
  5. Apply endpoint orientation and distribute axial twist deliberately.
  6. Preserve any residual error when the original request was infeasible.

This approach is fast, deterministic, and a strong fit for constrained limbs. Its limitation is scope: it does not decide how the spine, clavicle, pelvis, or other limbs should cooperate unless the surrounding controller explicitly moves them.

FABRIK

FABRIK—Forward And Backward Reaching Inverse Kinematics—solves a chain with alternating positional passes. A backward pass begins at the target and adjusts joints toward the root; a forward pass restores the root and adjusts joints toward the endpoint. Each pass maintains the distance between neighboring joints. The process repeats until the endpoint is close enough or an iteration limit is reached.

The method is intuitive and works well for longer chains, but the unconstrained algorithm is not a complete human model. Joint limits, closed chains, preferred posture, and unreachable configurations require additional handling. The original method and later constraint extensions are described by Aristidou and Lasenby (2011) and Aristidou, Chrysanthou, and Lasenby (2016).

Full-body IK

A full-body solver allows effectors to influence a connected hierarchy. A hand target may recruit the clavicle, spine, pelvis, and legs instead of forcing all correction into the arm. Multiple effectors can be solved together, while per-bone stiffness and priorities determine which regions yield and which resist.

Epic’s Full Body IK documentation illustrates effectors, preferred angles, stiffness, rotation limits, and root behavior. These controls are procedural animation tools; example engine values should not be treated as clinical measurements of human range of motion.

Full-body solving is most valuable when several contacts interact—two hands on a bar, feet planted while a hand reaches, or a character maintaining balance on uneven terrain. It also introduces more competing objectives, more tuning, and more opportunities for unexpected motion.

Robustness

Constraints, poles, and singularities

Preferred bend planes

A two-bone chain needs more information than an endpoint. The root and endpoint define an axis around which the middle joint can rotate, producing a family of valid solutions. A pole vector or preferred bend direction selects the plane for the elbow or knee.

The preference should be signed. An unsigned bend angle may say that a knee is folded by the right amount while missing that it points backward. Animation systems should preserve bend direction across frames and avoid allowing tiny target movements to flip the limb to the opposite solution.

Singular configurations

A chain becomes singular when its geometry no longer defines a unique or stable bend plane—for example, when the limb is perfectly straight, the target is coincident with the root, or the pole lies parallel to the target direction. Normalizing a zero-length vector in these states can create invalid rotations or collapse the limb.

A robust solver detects these cases and selects a stable perpendicular fallback, usually derived from the previous pose or the character’s local frame. Temporal continuity matters: the fallback should not change unpredictably from one frame to the next.

Joint limits need coordinate frames

A limit has meaning only together with its axis, reference pose, and rotation convention. Clamping a shoulder or wrist against world axes may appear correct while the character is upright and become nonsensical when the torso turns or the character lies on the ground.

The International Society of Biomechanics recommends anatomical landmarks and local coordinate systems for reporting upper-body joint motion. Its guidance is a useful foundation for rig-local limits and consistent measurement; see Wu et al. (2005) and the ISB elbow committee proposal.

Published human range-of-motion values also require careful interpretation. Population averages are not maximum safe limits, athletic performance targets, or prescriptions for every character. The CDC joint range-of-motion study and Soucie et al. (2011) show variation across joints and groups. Runtime limits should be documented as tunable animation guardrails unless they have been validated for another use.

Human model

Anatomy behind the chain

IK operates on a rig abstraction, but viewers judge the moving surface as a body. Better endpoint accuracy cannot repair an anatomically incoherent skeleton, a disconnected shoulder, an inverted knee, or a collapsing skin deformation.

The shoulder is a moving complex

Arm elevation is not produced by a fixed ball joint on the side of the chest. The clavicle, scapula, and humerus move together, and the coordination changes with the plane of elevation. Research using bone-fixed sensors supports this coordinated model rather than a single universal ratio; see Ludewig et al. (2009).

A practical rig can approximate the effect by allowing bounded clavicle and upper-torso participation during high reaches. This is still not a complete scapulothoracic model. A richer rig may need scapular rotation and translation, pose-corrective deformation, and collision between the upper arm and torso.

The surface must reinforce the motion. The deltoid wraps the shoulder, while the pectoralis major and latissimus connect the torso toward the upper arm. Biceps and triceps occupy different sides of the arm. These structures should not be represented as uniform tubes joined at a hinge. See the OpenStax overview of pectoral-girdle and upper-limb muscles.

Elbows, forearms, and wrists

Forearm pronation and supination should not be disguised as wrist rotation. If all axial roll is concentrated at one joint, the wrist develops a visible seam and the forearm appears mechanically wrong. Twist or deformation bones can distribute roll gradually while leaving the canonical hand and finger controls available for gripping.

Helpers of this kind improve deformation; they do not explicitly simulate the radius crossing the ulna. Wrist flexion, deviation, forearm roll, and elbow flexion should remain distinct controls in the joint model.

Pelvis, knees, ankles, and support

The pelvis transfers upper-body load toward the supporting leg and supplies the root context for lower-body IK. A foot target should therefore influence more than the ankle when the requested pose requires the pelvis to translate, tilt, or rotate.

Knees need a stable signed bend preference, just like elbows. Ankles and feet must address both endpoint placement and surface orientation. For a planted foot, sole contact, leg reach, knee direction, pelvis position, and balance are linked constraints—not independent finishing passes.

Visible lower-body anatomy also has direction: quadriceps shape the anterior thigh, hamstrings the posterior thigh, and the calf narrows into the Achilles region rather than continuing as a cylinder. OpenStax provides useful visual context for the pelvis and lower-limb muscles.

Animation system

IK in a movement pipeline

IK is strongest as one layer in a larger animation system. A believable runtime pipeline commonly follows this order:

  1. Start from a good authored or captured movement source.
  2. Interpret player intent and choose the movement task.
  3. Query the environment for usable surfaces and contacts.
  4. Select explicit hand, foot, gaze, or body targets.
  5. Move permitted roots such as the pelvis, chest, or clavicle.
  6. Solve constrained limbs or the full hierarchy.
  7. Apply endpoint orientation, twist distribution, and deformation corrections.
  8. Reassert important contacts after animation blending.
  9. Validate the final pose for limits, penetration, continuity, and balance.

Environmental geometry alone should not assign intent. The same ledge can be a surface to climb onto, cross, hang from, or ignore. A movement controller first decides what action is allowed; IK then adapts that action to the selected contacts.

Contact must survive blending

Blending two individually valid poses does not guarantee another valid pose. A hand planted in both source animations can drift through a wall between them, and a foot can pass through the floor. High-priority contacts should be solved or corrected after the blend that would otherwise disturb them.

Contact state also needs hysteresis and continuity. Repeatedly acquiring and releasing a target near a threshold produces visible popping. Once a hand or foot is declared planted, keep its target stable until a deliberate release condition is met.

Priorities and graceful failure

Not every simultaneous request can be satisfied. A useful controller defines which constraints may yield:

  • bone lengths should remain invariant;
  • safety and hard joint limits should outrank endpoint precision;
  • load-bearing contacts usually outrank decorative reaches;
  • a supporting foot may outrank a looking direction;
  • the pelvis or torso may move within authored bounds; and
  • impossible requests should retain measurable residual error.

This hierarchy turns failure into controlled approximation instead of a broken pose.

The visible result

Skinning and body shape

A correct skeleton can still produce an implausible character surface. Linear blend skinning may lose volume where differently rotated bones influence the same vertices, especially under shoulder motion, deep flexion, and forearm twist. Dual-quaternion skinning reduces familiar twisting and collapse artifacts, but it is still a deformation method rather than a muscle simulation. See Kavan et al. (2007).

It is useful to separate three kinds of change:

  • body shape, such as proportions and tissue distribution;
  • skeletal pose, produced by animation and IK; and
  • pose-dependent deformation, such as an elbow crease or corrected shoulder volume.

SMPL demonstrates this conceptual separation with learned body shape and pose-dependent corrections. That does not make an arbitrary procedural bulge physiologically accurate, and an IK system using the idea does not need to use SMPL assets.

Athletic appearance must also remain separate from simulated ability. Muscle definition, body fullness, sex-linked presets, age, and individual proportions are authoring choices. They should not silently assign strength, coordination, joint limits, or traversal permissions. Population studies such as Janssen et al. (2000) describe regional muscle distribution, not the ability of a particular character to perform a movement.

Testing

How to validate an IK system

Endpoint error is necessary to measure, but it is not sufficient. Validation should cover the solver, the skeleton, the final surface, and transitions over time.

Automated checks

  • Segment lengths remain constant within numerical tolerance.
  • Reachable targets converge within the intended positional and rotational error.
  • Unreachable targets produce a bounded solution and an accurate residual.
  • Coincident targets and parallel poles do not create invalid numbers.
  • Elbows and knees preserve their signed preferred bend direction.
  • Joint rotations stay inside limits expressed in the correct local frames.
  • Planted contacts remain stable through blend transitions.
  • Canonical joint names, bind transforms, and skin weights survive asset export.
  • Helper bones improve deformation without moving canonical endpoints.

Property-based tests are especially valuable for analytic solvers: generate targets throughout and beyond the workspace, vary pole directions, and assert invariants rather than checking only a handful of attractive poses.

Visual review

Inspect motion from the front, side, and back, both paused and at reduced speed. Use tasks that stress different parts of the system:

  • a low step-up with a planted lead foot;
  • a high ascent with hand support;
  • a ledge hang with load-bearing arms;
  • a two-handed bar swing;
  • a reach near full extension;
  • a deep crouch or raised-foot pose; and
  • a floor recovery that changes the torso’s local frame.

Look beyond the endpoint. Check palm direction, thumb orientation, forearm twist, elbow and knee folding, shoulder connection, pelvis response, foot penetration, self-contact, and continuity between poses.

What a passing IK test does not prove

IK does not determine the forces that created a pose. A solved configuration does not establish muscle activation, joint torque, ground reaction forces, fatigue, or whether a particular real person can execute the movement. OpenSim’s workflow overview distinguishes inverse kinematics from inverse dynamics and muscle-driven analysis.

For this reason, numerical limits should state their provenance. A value may be an animation guardrail, a design choice, a value measured from a specific dataset, or a validated biomechanical limit. These categories should never be presented as interchangeable.

Further reading

Research references

Questions

Frequently asked

What is inverse kinematics?

Inverse kinematics starts with a desired endpoint, such as a hand or foot position, and computes joint configurations that place the endpoint there while satisfying the model's constraints.

How is inverse kinematics different from forward kinematics?

Forward kinematics applies known joint transforms to find the final body-part positions. Inverse kinematics begins with a desired body-part position or orientation and works backward to find suitable joint transforms.

Why can an IK pose look wrong even when the hand reaches its target?

The target usually has multiple solutions. Without preferred posture, anatomical joint frames, bend constraints, contact rules, and coordinated body motion, a solver can reach the point with an implausible elbow, shoulder, wrist, or balance state.

Which IK solver should a game use?

A constrained analytic solver is efficient for a two-segment arm or leg. FABRIK is useful for longer chains, while multi-contact characters may need a full-body solver. The best choice depends on chain complexity, constraints, contacts, and runtime budget.

Does inverse kinematics simulate muscle forces?

No. IK produces a pose. It does not by itself determine muscle activation, joint torque, ground reaction forces, fatigue, or whether a real person could perform the motion.