# Motion Warping Asset

## Curves and Warp Phases

This plugin uses **Motion Warping Assets** to control how the animation will be warped in runtime. To create a new **Motion Warping Asset**, make sure to: <mark style="background-color:purple;">**Right click -> Create -> MotionWarping -> MotionWarpingAsset.**</mark>

<figure><img src="/files/fPClTFT8T5nNHnrtX7fo" alt="" width="412"><figcaption><p>This asset contains all properties that configure the warping process.</p></figcaption></figure>

Now we need to select the animation we want to warp. Let's use a **JumpOver** clip as an example. Then, press the **"Extract Curves"** button. It will generate the root motion curves from the clip:

<figure><img src="/files/hoQiBPOsKwza26oCbjAl" alt="" width="377"><figcaption><p>Curves are properly extracted!</p></figcaption></figure>

{% hint style="success" %}
**Tip**: you can modify these curves manually if your animation does not contain keyframes for the root.
{% endhint %}

The next step is to tell the system what parts of the animation we want to warp. To do this, we need to set the **Phases Amount** to the number of parts we want to warp.

{% hint style="info" %}
**Example:** In the **JumpOver** animation, this value is **3** because we have 3 target points: close edge, far edge, and landing point.
{% endhint %}

After that, hit the **"Generate Phases"** button:

<figure><img src="/files/RXS69JKptIwMjmtTO02h" alt="" width="368"><figcaption></figcaption></figure>

{% hint style="success" %}
**Tip**: it is possible to drag and resize **Warp Phases**, by hovering over the green bars and their edges.
{% endhint %}

For every green segment, there is an element in the **Warp Phases** list. Let's see what properties the phases have:

<figure><img src="/files/b47ZZHU8kTnpe69bs3jv" alt="" width="475"><figcaption></figcaption></figure>

* **T Offset**: translation offset for the target point.
* **R Offset**: rotation offset for the target point.
* **Start Time**: animation start time for this segment.
* **End Time**: animation end time for this segment.
* **Min Rate**: minimum allowed playrate.
* **Max Rate**: maximum allowed playrate.
* **Total Root Motion**: the final distance for each axis.

{% hint style="warning" %}
**Tip:** close and open up the asset again to generate the total root motion!
{% endhint %}

## Additional Properties

For fine-tuning, **Motion Warping Asset** offers additional functionality to control the warping process:

<figure><img src="/files/9Ea9yjKIiyXwAgTHZg2z" alt="" width="369"><figcaption></figcaption></figure>

* **Use Linear:** whether to use linear interpolation for the selected axes.
* **Use Animation:** whether to play animation on top of warping adjustments; keep this on for all axes, unless animation is not required.
* **Use Warping**: whether to warp the selected axes.
* **Use Collision**: whether to use native (*CharacterController* or *Rigidbody*) collision when warping. For example: if we want to warp the sword attack animation, we can enable the collision, so the character will react to the environment.

***

At this point, our **Motion Warping Asset** is ready. Next, we are going to learn about the main component of the system.


---

# 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/motion-warping-for-unity/fundametals/motion-warping-asset.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.
