Sub topic 12
Inverse Kinematics with Targets
Prerequisites
Assume that you can switch between Object, Edit, and Pose Mode. You also need a two-bone armature with a parent bone and a child bone. In this chapter, the child bone is the end of the chain.
Inverse kinematics (IK) lets you move an end bone toward a target. Blender calculates the rotations for the parent bones. This is useful for hands, feet, and other parts that need to reach a location.
How IK changes posing
With forward kinematics (FK), you rotate each parent bone first and then rotate its children. With IK, you move a target object, and Blender solves the chain from the target back toward the parent.
The target does not need to be a bone. An Empty is often useful because it is easy to select and move.
An IK constraint has three important settings:
- Target is the object that the chain follows.
- Chain Length tells Blender how many bones to solve.
- Pole Target, when used, controls the direction in which an elbow or knee bends.
If the chain length is 2, Blender solves the constrained bone and its parent. A chain length of 1 affects only the constrained bone.
Add an IK constraint
Select the end bone in Pose Mode. Open the Bone Constraints tab, choose Add Bone Constraint, and select Inverse Kinematics. Set the target to an Empty and set Chain Length to 2.
You can also create the same setup with Python. This example expects an armature named DemoRig with a pose bone named child.
import bpy
armature = bpy.data.objects["DemoRig"]
target = bpy.data.objects.get("IK_Target")
if target is None:
target = bpy.data.objects.new("IK_Target", None)
bpy.context.collection.objects.link(target)
target.location = (1.0, 0.0, 2.0)
bone = armature.pose.bones["child"]
ik = bone.constraints.get("Reach target")
if ik is None:
ik = bone.constraints.new(type="IK")
ik.name = "Reach target"
ik.target = target
ik.chain_count = 2Move IK_Target in the viewport. The child bone follows it, and the parent bone rotates to keep the chain connected.
Common errors and troubleshooting
- The wrong bones move: Increase or decrease Chain Length. A value of
2includes the constrained bone and its parent. - The chain bends backward: Add a Pole Target and place it in front of the intended elbow or knee direction.
- The target has no effect: Check that the armature is in Pose Mode and that the constraint has a target object.
- The chain stretches unexpectedly: Confirm that the bones and target use compatible object transforms. Apply unusual object scale before building the rig.
- The target is difficult to select: Display the Empty in front of other objects, or place it in a separate collection.
Exercise
A two-bone arm has an IK constraint on its hand bone. Which Chain Length value makes both the upper-arm and forearm bones participate?
Show answer
Use Chain Length 2. The value counts the constrained hand-side bone and its parent.