---
title: RootMotionBoneId
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/rigbuilder/rootmotionboneid
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/rootmotionboneid.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:56:45.498Z
locale: en-us
---

# RootMotionBoneId

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

## Definition

* **Type:** Property
* **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 StringHash RootMotionBoneId { get; readonly set; }
```

### Remarks

By default, the value isn't set: it is the default `StringHash`, and the root motion bone is the root bone of the skeleton. Set it to choose another bone, for example a hips bone under a root that clips don't animate. The identifier of a bone is the [StringHash](/engine/7000.0/script-reference/unity/animations/stringhash.md) of its path relative to the root of the hierarchy, for example `rigBuilder.RootMotionBoneId = "Skeleton/Hips"`. Set the default `StringHash` to go back to the root bone. [RigBuilder.Clear](/engine/7000.0/script-reference/unity/animations/rigbuilder/clear.md) also resets the value to the default.

[RigBuilder.ToRigDefinition](/engine/7000.0/script-reference/unity/animations/rigbuilder/torigdefinition.md) stores the index of the bone in [RigDefinition.RootMotionBoneIndex](/engine/7000.0/script-reference/unity/animations/rigdefinition/rootmotionboneindex.md). When a clip has no root motion curves, [ClipSampler.SampleRootMotion](/engine/7000.0/script-reference/unity/animations/clipsampler/samplerootmotion.md) returns the motion of this bone in character space, which includes the motion of its parent bones. [ClipSampler.SampleExtractingRootMotion](/engine/7000.0/script-reference/unity/animations/clipsampler/sampleextractingrootmotion.md) removes the root motion from this bone in the pose.

Add the bone before you set this value. If safety checks are enabled, setting it throws an `ArgumentException` when no bone of the skeleton has this identifier, and `ToRigDefinition` throws one when you removed the bone afterward.
