> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinemation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Two Bone IK Modifier: Limb Solving for Arms and Legs

> The Two Bone IK modifier solves inverse kinematics for a two-bone chain — commonly used for arms reaching targets and legs stepping on surfaces.

The **Two Bone IK** modifier attaches the tip of a two-bone limb — typically a hand or foot — to a target position and rotation in world space or to another bone in the hierarchy. CAS uses a proxy-bone workflow where an IK target bone is first initialised from the real animated bone, then repositioned by upstream modifiers (like Foot IK or Step Modifier), and finally consumed here to drive the actual limb solve.

## Properties

<ParamField path="Tip" type="KRigElement">
  The terminal bone of the chain — the bone that must reach the target. For arms this is the hand; for legs this is the foot.
</ParamField>

<ParamField path="Target" type="KRigElement">
  The bone or transform the **Tip** should reach. This is typically an IK proxy bone (`IK hand_r`, `IK foot_l`, etc.) that upstream modifiers have already positioned.
</ParamField>

<ParamField path="Use World Target" type="bool" default="false">
  When enabled, the modifier reads **IK Target Transform** as a world-space position and rotation instead of looking up a bone in the skeleton. Enable this when you want to drive IK from an arbitrary scene object.
</ParamField>

<ParamField path="IK Target Transform" type="Transform">
  A world-space `Transform` used as the IK target when **Use World Target** is enabled. Assign a scene GameObject — for example, a grab point on a prop.
</ParamField>

<ParamField path="Hint Weight" type="float" default="1">
  Controls how strongly the **Pole Target** pulls the middle joint (elbow or knee) in its direction. Lower this value if the pole is producing unnatural bending.
</ParamField>

<ParamField path="Pole Target" type="KRigElement">
  The hint or pole bone that determines which way the middle joint bends. For arms this is an elbow hint; for legs this is a knee hint.
</ParamField>

<ParamField path="Hint Offset" type="Vector3">
  A local-space position offset applied on top of the **Pole Target** bone position. Use this to nudge the pole direction without moving the pole bone itself.
</ParamField>

<ParamField path="Max Limb Length Scale" type="float" default="1">
  The maximum allowed limb length multiplier. Values above `1` let the solver stretch the limb slightly to reach distant targets; keep at `1` for non-stretchy limbs.
</ParamField>

## Proxy-Bone Workflow

Most Two Bone IK setups in CAS follow a three-stage pattern:

<Steps>
  <Step title="Copy real bone to IK target">
    Use a **Copy Bone** modifier to copy the animated hand or foot pose into the corresponding IK proxy bone. This seeds the IK target with the current animation pose.
  </Step>

  <Step title="Apply procedural corrections to the IK target">
    Let upstream modifiers — **Foot IK**, **Step Modifier**, or your own custom logic — move and rotate the IK proxy bone to its corrected world position.
  </Step>

  <Step title="Solve with Two Bone IK">
    The **Two Bone IK** modifier reads the final IK proxy position and solves the limb chain so the **Tip** bone arrives there. The original animation pose is preserved on all other bones.
  </Step>
</Steps>

This workflow preserves the base animation while allowing arbitrary procedural correction, because the real hand or foot bone is only affected at the very end of the chain — not overwritten early.

## Use Cases

* **Foot planting on terrain** — combine with **Foot IK** to move the foot IK target to the surface hit point, then use Two Bone IK to drive the leg to that position.
* **Hand-to-prop attachment** — attach a character's hand to a door handle, ladder rung, or lever by setting an in-world Transform as the **IK Target Transform**.
* **Procedural stepping** — work alongside the **Step Modifier** to reposition the foot IK target during transitions and have Two Bone IK follow through.
* **Left-hand weapon grip** — place the left hand IK target on the weapon's foregrip point and drive it with Two Bone IK for an always-correct two-handed weapon hold.

<Tip>
  When you have both arms and both legs to solve, consider using the **Full Body IK** modifier instead of four separate Two Bone IK modifiers. Full Body IK gives you a single Weight Override entry that controls all four chains simultaneously.
</Tip>

<Note>
  The **Pole Target** (hint or knee bone) is optional but strongly recommended. Without it the solver picks a default bend direction that may flip unpredictably when the limb crosses certain angles.
</Note>
