# Character Animation

## Step 1 - Import your animations

Specify the Generic or Humanoid rig. Bake the rotation and translation into the pose and specify the right avatar for your character.

Create a copy of your animation clip - we will need to make changes to it:

<figure><img src="https://lh5.googleusercontent.com/lyY5FQ_d9xm7qUd8dvL3fhSEjt0YVuIlUa3kGSGS4pfmYY7aro6QhSIBhlHBK-xvXdwnvtzVpYh8uBDm2CQbcbwIgU1VTRUq22KzeyQ6L6zw3CJHw3hI6houu2ts0hexLALj-hRLtWa6Fppi9FehcGI" alt="" width="188"><figcaption><p>Copy and paste the animation</p></figcaption></figure>

## Step 2 - Animate the WeaponBone

Now we need to copy the animation data from the skeleton IK bone to the **WeaponBone** object.

<details>

<summary>Why do we need to do this?</summary>

This approach doesn't require changing your skeleton at all, which will save you a lot of time. WeaponBone is a game object, automaticallt added by the system, and it's used for the IK and animation blending.

</details>

Open up the **Transform Retarget** tool:

<figure><img src="https://3983499731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxsGuM7QMKoTm8rnHX3cO%2Fuploads%2FKv811XerC8DhG8NyvXtU%2Fimage.png?alt=media&#x26;token=762b9537-a95d-4f09-bd59-f61d335c61ec" alt="" width="467"><figcaption></figcaption></figure>

<figure><img src="https://lh6.googleusercontent.com/OT1hDBet2IN7WWEiVjjDz_zAdFfVQnNoAbr8AbRiho6pUb2VI6gSOw5ojy-5RLkw7FqUCGytCFXcrTOotmkyhhPmsFGegRJFmnDYGNgNbtjricJyCwzUWoRngGYCn3dDMmUzFwrj9rsRaoKZ0vqSLIw" alt="" width="375"><figcaption><p>A window will pop up</p></figcaption></figure>

Select your animation as a Source and Target animation clip - that’s because we want to copy the animation data within one animation.

Now add your in-game and IK Rig characters to the scene:

<figure><img src="https://lh5.googleusercontent.com/I0mqdoGfk_9WzNTHsNHbmQ8-caXwhvVl0r65AzfiDgmWRhv3nh1doAPIlSg2dbGcweIF5aNx4mzLllGDKCQQYFqKeSDEOyEckwN91_M9JVuCXR5uZTpecyDC0ajlutrteA7KjfTFBFrXHYWRgGMASWI" alt="" width="375"><figcaption></figcaption></figure>

Now assign the transforms as follows:

<figure><img src="https://lh3.googleusercontent.com/efseEKt3mK_CtFH8tGfiDmx1mJvJc09dwQvz3MYxz0bYYZ9HT6mPn002mdeXJDgKrNNOrAnTpSIJD2_YxIXN0bzKA0tG6N66gaVO5TURNOOZuvGazlOIrfvfAUMioUkwMSnUW8_wgWkD-hnouMr0LHU" alt="" width="375"><figcaption><p>Click the Retarget Animation button</p></figcaption></figure>

After that you shoulf see keyframes for the WeaponBone in your animation:

<figure><img src="https://lh4.googleusercontent.com/PvkoWkampfPf4B_Bn3CZNKBxxTuCVODjuoNP7Z2WB5GlDjbMZrpBW-EI67Tlo72IjHlmcJ-u4fiI1l61WJgqZt_SZlOW3xI7hg0h1W1Fjkuibw9XJT0CLwjXsOMiXs-mGvYGWpnUAiQwc3ax0p3CY7k" alt="" width="375"><figcaption></figcaption></figure>

## Step 3 - Modify the Avatar Mask

Unity won’t allow you to select a custom object like WeaponBone, because it’s not a part of the bone hierarchy.&#x20;

For this go to the FPS Animator/Rig tab/Select your upper body avatar mask and click “Setup Avatar Mask”. Now your mask should have an extra property:

<figure><img src="https://lh4.googleusercontent.com/pGjzJC8mVvvwVuwDQ0V9oOZFJjLE6U0YCsGIqv4Ol889hwcT1yCn8ES5iihR0G_AzQQaHa46dwjb8g6Uj7nEEncDludHb7CfihKVMTzUHAH7HVoUR0S3KDRjU3D8V3BUZiTg6OLpBn3tgzZ45I5OSPE" alt="" width="375"><figcaption></figcaption></figure>

At this point the animation setup is complete. Create an AnimSequence for your animation and add it to the weapon, check if there’re any issues in the game.

<details>

<summary>AK12 AnimSequence Example</summary>

These curves are essential:

<img src="broken-reference" alt="" data-size="original">

* **MaskLeftHand** disabled the left-hand ik.
* **Overay controls** how the system overrides the upper body.
* **WeaponBone** parents the weapon to the WeaponBone (by default it’s following the right hand, set the curve value to 1).

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kinemation.gitbook.io/fps-animation-framework/tutorial/animation-workflow/character-animation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
