# Motion Warping Component

## In the Editor

**Motion Warping** is the main component in the system, as it is used for initiating interactions and warping animations in runtime. Make sure to add this component to your character:

<figure><img src="https://1415000928-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUAC5B06XWM8YyqQzyIP2%2Fuploads%2FE3tVZ0OAhZycsQjaO2iS%2Fimage.png?alt=media&#x26;token=fe37b053-e941-49b1-b565-f75ad50b670c" alt="" width="410"><figcaption><p>Example of a set up Motion Warping component.</p></figcaption></figure>

Let's break down each property of this component:

* **Scale Play Rate**: whether to modify the original play rate; for example, if the distance is longer - the play rate will be reduced, if shorter - increased.
* **Play Animator**: whether to automatically play the animation via *Animator*.
* **Blend Time**: cross-fade blend in time for the animation.
* **OnWarpStarted**: called right before the interaction. Use it to disable collisions and other systems.
* **OnWarpEnded**: called right after the interaction. Use it to enable collision or movement.

## In Code

It is important to reference the **Motion Warping** component in your controller code:

```csharp
public class YourController : MonoBehaviour
{
    //...
    private MotionWarping _warpingComponent;
    //...

    private void Start()
    {
        //...
        _warpingComponent = GetComponent<MotionWarping>();
        //...
    }
}
```

We will use this component to start interactions. And more about that in the next chapter!&#x20;


---

# 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-component.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.
