# Inverse Kinematics

<video controls="controls" height="400" width="800"><source src="https://wiki.pragma-engine.com/attachments/5"></source></video>

To be able to animate using inverse kinematics, you have to set it up first. Luckily doing so is fairly straight-forward:

1. Create an [articulated actor](https://wiki.pragma-engine.com/books/pragma-filmmaker/page/actor-editor#bkmrk-articulated-actors) in your scene
2. Expand the bone list `actor > Components > animated > bone` in the actor editor  
    [![bone_list.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-07/scaled-1680-/pragma-2022-07-24-15-07-17.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-07/pragma-2022-07-24-15-07-17.png)
3. Right-click the bone for which you want to add an IK chain. This bone will be the effector. Now choose `Add IK Control > <ParentBone>` from the menu. An IK chain will be created, which will include the `<ParentBone>`, the effector and all of the bones in-between in the hierarchy.
4. Scroll down to the bottom of the `Components` list and you should find a new entry called `pfm_ik`. Here you will find all of the effectors you've added:  
    [![pfm_ik_effectors.png](https://wiki.pragma-engine.com/uploads/images/gallery/2022-07/scaled-1680-/pragma-2022-07-24-15-13-09.png)](https://wiki.pragma-engine.com/uploads/images/gallery/2022-07/pragma-2022-07-24-15-13-09.png)
5. Use the viewport transform modes to move the effector position and you should see the IK in action.

<p class="callout info">The IK configuration data is model-dependent and project-independent. If you use the model of the actor that you've added a IK chain for in another project (or the same one), the `pfm_ik` component of the new actor should already list all of the IK chains you have created for the model previously, i.e. you only have to create them once per model.</p>

<p class="callout warning">The IK system currently does **not** support limits. This means that, for instance, an arm can bend in ways that wouldn't be possible in real life.</p>