How to Keep IK Foot Targets Planted While Moving a Character’s Body
To keep IK feet planted, hold each foot target’s world position steady while moving the character’s body control. Let the leg solver adjust the joints between the moving body and the fixed target. If a target inherits movement from the body, separate that transform relationship or compensate for it before the IK solve.
This guide is for creators posing a rigged virtual character whose body should bob, lean, or shift while both feet stay in place. The workflow below combines documented transform and IK behavior with a practical diagnostic sequence; Unity and Godot terminology provides concrete reference points.
Why do foot targets move with the body?
A target can have unchanged local coordinates and still move through the scene. Local transforms describe an object relative to its parent, so moving an ancestor also changes the child’s world transform. Godot documents this distinction through transform and global_transform. Using 3D transforms — Godot Engine
Start by displaying the foot target controls and moving the body slightly sideways. Watch the targets separately from the visible feet. If a target moves with the body, inspect its ancestors: it may sit beneath the pelvis, body control, or another moving group.
Do not judge the setup from local position fields alone. Record the target’s world position before and after the move. This separates two useful questions: did the target leave its intended position, or did the leg fail to follow a stationary target?
How should you organize the body and foot controls?
Use separate control branches for body motion and planted foot targets. A practical arrangement places the skeleton and body controls in one branch, with left and right foot targets in another branch under a stationary scene control. The essential condition is that the body control you manipulate must not move the target branch.
A common overall character control can still contain both branches when you only move the body beneath it. However, moving that overall control will move both branches. Decide whether your operation means “shift the body over planted feet” or “relocate the entire character” before choosing the control.
Where an application supports independent transform inheritance, that can provide another option. For example, Godot’s Node3D.top_level makes a node stop inheriting its parent’s transformations. This is a documented transform feature; it does not itself configure an IK solver. Node3D — Godot Engine
When changing a target’s parent or inheritance mode, preserve its existing world pose. First record its world position and orientation, change the relationship, then restore that pose. Verify the result before moving the body again.
What if the target must stay under a moving parent?
Keep an independent record of the planted world pose and calculate the target’s required local pose from the parent’s current transform. For position, the relationship is: target local position = inverse of current parent world transform × saved target world position. Unity provides the world-to-local conversion through InverseTransformPoint. Transform.InverseTransformPoint — Unity
Consider an illustrative translation-only example. A target is planted at world X = 1.0, and its parent starts at X = 0.0. Its local X is therefore 1.0. Move the parent to X = 0.3, and the target needs local X = 0.7 to remain at world X = 1.0. Leaving local X at 1.0 would move the target to world X = 1.3.
That subtraction only handles the simplified example. A rotated or scaled parent requires the full transform conversion. Unity’s TransformPoint converts a local position into world space and explicitly includes scale, which is why position conversion should use a point operation rather than a direction operation. Transform.TransformPoint — Unity
Capture the planted pose when the foot enters its planted state. Reuse that saved value while the body moves. Recapturing the target after it has inherited movement simply stores the drift as a new reference. If orientation must remain fixed too, preserve and convert the target’s orientation as well as its position.
How do you configure the leg IK to follow the targets?
Check the solver’s chain assignments before testing a large pose change. In Unity Animation Rigging 1.4.1, Two Bone IK uses Root, Mid, and Tip transforms, a Target, and an optional Hint. For a simple two-segment character leg, these correspond to the upper-leg joint, knee joint, and ankle joint. The hint controls the bend direction. Two Bone IK — Unity Animation Rigging
For an initial test, use full constraint influence and full target position influence. Check target rotation influence separately. Unity exposes these as distinct weights, so positional following and orientation matching can be tested independently. Its Maintain Target Offset setting preserves an initial position or rotation difference between the tip and target. Two Bone IK — Unity Animation Rigging
Align the targets to the intended ankle poses before enabling the constraints. If you deliberately use an offset, record what it represents. An unexplained initial offset makes later comparisons between the target and solved joint difficult.
Establish the intended knee bend with the hint or pole control, then move the body a small amount. Keep the hint placement understandable throughout the test; changing the target, body, and bend control simultaneously makes the cause of an unexpected result harder to identify.
How far can the body move while both feet remain planted?
Fixed targets do not make every body position reachable. For an ideal two-segment chain with unrestricted joints and no stretching, geometry requires the distance from the leg root to the target to fall between |upper length − lower length| and upper length + lower length. Actual joint limits can reduce that range.
For an illustrative character with segment lengths of 0.45 and 0.45 scene units, maximum geometric reach is 0.90 units. If the hip is 0.80 units above the ankle target and 0.30 units horizontally away, their distance is √(0.80² + 0.30²), approximately 0.854 units. That fits within the ideal range. Increasing the horizontal separation to 0.50 units produces approximately 0.943 units, beyond that range.
Use this calculation to distinguish a reach problem from a transform problem. If the target stays fixed but the chain cannot reach it, reduce the body displacement or reposition the body to accommodate both legs. Evaluate each leg separately: a sideways shift can bring one target closer while moving the other farther away.
For the first working pose, leave visible bend in both legs and test modest movement. Expand the body’s motion range only after checking where each leg approaches its reachable limits. Treat that range as a rig-specific result rather than copying a displacement value from another character.
How do you keep the whole foot planted rather than only the ankle?
Define what “planted” means for your rig. A stationary ankle target establishes a joint position, but the foot also needs an intended orientation. A sole contact point and an ankle pivot are different reference points; preserve their designed offset when placing the control.
A useful diagnostic is to hold the ankle position steady and rotate only the body. Observe the heel and toe. If they move around the ankle, inspect the foot’s orientation controls and any separate toe controls. This test isolates visible contact from target position.
Store the intended planted orientation alongside the position. During body movement, compare both against the saved pose. Godot’s transform documentation explains that a transform combines an origin with a basis representing orientation and scale, making it a useful reference for understanding a complete pose. Using 3D transforms — Godot Engine
How can you diagnose sliding in a repeatable order?
Use the following sequence as a practical diagnostic aid derived from the transform and solver behavior above. Change one condition at a time, starting with the smallest body movement that reproduces the problem.
| Observation | First check | Next action |
|---|---|---|
| Target moves with the body | Moving ancestors and inherited transforms | Separate the control branches or restore the saved world pose |
| Target stays fixed, ankle misses it | Chain assignments, position influence, and reach | Verify setup, then reduce body displacement |
| Ankle stays fixed, heel or toe moves | Foot orientation and contact offset | Restore the intended planted orientation |
| Knee changes bend unexpectedly | Hint or pole placement | Test the bend control with modest body movement |
| Result differs between dragging and playback | Which system writes each control, and when | Inspect the evaluated transforms during playback |
For an animated or procedural setup, use an explicit dependency order: establish the body pose, restore or convert the saved targets, then evaluate the leg IK. Confirm how your application schedules those operations. A callback name alone does not establish that the solver reads the updated target in the same evaluation.
Finish by testing a short loop: move the body sideways, lower it, rotate it slightly, and return to the starting pose. Compare each target’s world pose with its saved reference throughout. Once the targets stay fixed, the remaining adjustments become specific: reachable body movement, consistent knee direction, and the foot orientation needed to maintain the intended contact.
