---
title: RootMotionBoneIndex
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigdefinition/rootmotionboneindex
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigdefinition/rootmotionboneindex.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:13:17.651Z
locale: en-us
---

# RootMotionBoneIndex

> The index of the bone whose motion gives the root motion of a clip.

## Definition

* **Type:** Field
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

```csharp
public int RootMotionBoneIndex
```

### Remarks

The value is an index in [Skeleton.Ids](/engine/7000.0/script-reference/unity/animations/skeleton/ids.md). [RigBuilder.ToRigDefinition](/engine/7000.0/script-reference/unity/animations/rigbuilder/torigdefinition.md) sets it to the bone that you set in [RigBuilder.RootMotionBoneId](/engine/7000.0/script-reference/unity/animations/rigbuilder/rootmotionboneid.md), or to 0, the root bone, if you don't choose one. The value is `-1` if the rig has no skeleton.

[ClipSampler.SampleRootMotion](/engine/7000.0/script-reference/unity/animations/clipsampler/samplerootmotion.md) uses this bone when the clip has no root motion curves, and [ClipSampler.SampleExtractingRootMotion](/engine/7000.0/script-reference/unity/animations/clipsampler/sampleextractingrootmotion.md) removes the root motion from this bone.
