> For the complete documentation index, see [llms.txt](https://docs.motorica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.motorica.com/documentation/style-cloning/how-to-guides/edit-an-animations-root-motion-data.md). Agents can also search and read this documentation through its [MCP server](https://docs.motorica.com/~gitbook/mcp).

# Edit an Animation's Root Motion Data

Adjust the extracted root motion for strafes, idles and turns in place so your Style Clone learns the right movement.

Motorica extracts root motion automatically for every animation you upload, and for most files no action is needed. This guide shows how to adjust the extraction for the clips where the default might not be what you want: strafes, idles and turns in place. For background, see [Root Motion Extraction](https://docs.motorica.com/learn/concepts/style-cloning.md#root-motion-extraction).

{% embed url="<https://vimeo.com/1237644608/3d2389ab3b#t=112s>" %}
Starts at the Adjust root motion chapter (1:52). The video locks rotation at 90° on a running arc only to show the controls. For arcs, keep the default settings.
{% endembed %}

{% hint style="warning" %}
**Only edit root motion when you have a specific reason.** The editor shows the same warning: changing these settings can lower the quality of your Style Clone. The default extraction is the right choice for most locomotion, such as walks, runs and arcs.
{% endhint %}

## Before you start

* You have a style dataset with your animations uploaded. See [Create a Style Clone](https://docs.motorica.com/documentation/style-cloning/how-to-guides/create-a-style-clone.md).
* The files you want to edit show **Validated** in the **Status** column and **Extracted** in the **Root motion** column.

## Choose your settings

Decide what each clip needs before you open the editor. Match the settings to what the character actually does in the clip, and leave everything else on the defaults.

| Animation type                          | Extract root motion | Lock rotation                               | Lock position   |
| --------------------------------------- | ------------------- | ------------------------------------------- | --------------- |
| Walks, runs, arcs                       | On                  | Off                                         | Off             |
| Strafes                                 | On                  | On, auto-detect or a fixed angle such as 0° | Off             |
| Idles                                   | On                  | On, auto-detect                             | On, auto-detect |
| Turns in place                          | On                  | Off                                         | On, auto-detect |
| Files with root motion you want to keep | Off                 | —                                           | —               |

{% hint style="info" %}
**Tip:** Select every clip of the same type together, for example all strafes, and apply the settings in one go.
{% endhint %}

## Edit root motion

1. Open **Style Cloning** and click the style dataset you want to work on.
2. In the **Animation files** table, tick each animation you want to change. Files you select together all get the same settings.
3. Click **Edit RM** above the table. The **Edit root motion for N assets** panel opens, where N is the number of files you selected.
4. Change the settings you need. When you tick **Lock rotation** or **Lock position**, its auto-detect setting turns on. Leave it on unless you know the exact value. To enter a value yourself, turn auto-detect off and type an angle in degrees, or a position as x and y in centimetres. The info icon next to each setting gives a short explanation, and [Style Cloning UI > Edit root motion panel](https://docs.motorica.com/documentation/style-cloning/reference/style-cloning-ui.md#edit-root-motion-panel) has full details.
5. Click **Apply settings**. Motorica runs the extraction again for the selected files.
6. Check the result in the preview, as described in the next section.

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2FUByUTilORDDWrmq90Uzh%2Frm-edit-panel-7-assets.png?alt=media" alt="Seven turn-in-place files selected, with the Edit root motion panel open at its default settings"><figcaption><p>The panel title shows how many files you're editing. These are the default settings.</p></figcaption></figure>

{% columns %}
{% column %}

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2FQSvdgcTCsipVcUc1EIbt%2Frm-lock-rotation-90.png?alt=media" alt="Lock rotation on, Auto-detect angle off, angle set to 90 degrees" width="219"><figcaption><p>Lock rotation with a fixed angle of 90°.</p></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2FSRnH87mwo3T5FOGmYfZ8%2Frm-lock-position-x10-y0.png?alt=media" alt="Lock position on, Auto-detect position off, x 10 cm and y 0 cm" width="224"><figcaption><p>Lock position at x 10 cm, y 0 cm.</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

## Check the result

Each edited file still shows **Extracted** in the **Root motion** column. A small chip under the badge shows icons for the locks you set, so you can see at a glance which files have edited root motion.

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2F060S2BmMotBTABUYs3EW%2Frm-lock-chip.png?alt=media" alt="The Animation files table where the edited file shows a lock chip under its Extracted badge"><figcaption><p>The edited file (top row) shows a chip under its Extracted badge.</p></figcaption></figure>

Click **Preview ready** next to the file to open the 3D preview, and check:

* **The line on the floor** is the root's path. For a strafe or a walk, it should follow the character's movement smoothly.
* **The ring and arrow** under the character show the root's position and facing direction. With rotation locked, the arrow should point the same way for the whole clip.
* **For an idle or a turn in place**, the ring should stay under the character's feet and not drift.

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2FTDGmjlzAblZGk4oD40x7%2Frm-preview-90.png?alt=media" alt="The 3D preview of a running character with the root path on the floor and a yellow ring and arrow marked 90 under its feet"><figcaption><p>After locking rotation at 90°. The white line is the root path; the yellow arrow shows the locked facing direction.</p></figcaption></figure>

Previewing a file also counts towards the **Dataset checkup**.

## Troubleshooting

| Problem in the preview                                            | What to try                                                                                                                                                                                                              |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| A strafe's root turns with the movement instead of facing one way | Turn on **Lock rotation**. If auto-detect picks the wrong direction, turn it off and enter the angle.                                                                                                                    |
| An idle slowly slides or rotates                                  | Turn on both **Lock rotation** and **Lock position**, with auto-detect on.                                                                                                                                               |
| A turn in place drifts across the floor                           | Turn on **Lock position** and leave rotation unlocked.                                                                                                                                                                   |
| The root faces the wrong way after you entered an angle           | Check the angle, or switch back to **Auto-detect angle**.                                                                                                                                                                |
| An edit made the result worse                                     | Select the file, open **Edit RM**, clear the locks and apply again. This restores the default extraction.                                                                                                                |
| The file shows a warning                                          | Open it in the preview. If the root path or facing is wrong, use the settings above. See [Errors and warnings](https://docs.motorica.com/documentation/style-cloning/reference/data-preparation.md#errors-and-warnings). |

**Example: a sliding idle**

{% columns %}
{% column %}

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2Ft3NSGEF744qoehQoy8C5%2Frm-before-sliding-idle.png?alt=media" alt="Before: a mostly stationary character with a root path that jumps around on the floor"><figcaption><p>Before: the root path jumps around under a character that barely moves.</p></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="https://3701240830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4XRcFZ7K0KOxbfN13Yz%2Fuploads%2F3PVjzzahXtBCQFJPtF1V%2Frm-after-locked-idle.png?alt=media" alt="After: an idle character with the root ring under its feet and the facing arrow at 0 degrees"><figcaption><p>After locking rotation and position: the ring stays under the feet and the arrow points one way.</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

## Next step

When every file looks right, go back to **Style Cloning**, select the dataset and click **Start style cloning**. See step 6 of [Create a Style Clone](https://docs.motorica.com/documentation/style-cloning/how-to-guides/create-a-style-clone.md).

Need help? Contact us through **Feedback** in the top bar.
