---
title: TrySetBoneDefaultRotation(int, quaternion)
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/trysetbonedefaultrotation
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultrotation.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:25:06.934Z
locale: en-us
---

# TrySetBoneDefaultRotation(int, quaternion)

> Sets the default rotation of the bone at a bone index.

## Definition

* **Type:** Method
* **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 bool TrySetBoneDefaultRotation(int boneIndex, quaternion rotation)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The bone index of the node.**** (\[quaternion]\(/engine/7000.0/script-reference/unity/mathematics/quaternion)): The default rotation, relative to the parent bone.

### Returns

| Type                                                          | Description                                                                                         |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder has a node at the bone index. Otherwise, false, and the builder doesn't change. |

### Remarks

The default rotation is the [SkeletonNode.LocalRotationDefaultValue](/engine/7000.0/script-reference/unity/animations/skeletonnode/localrotationdefaultvalue.md) of the node. To get the bone index of a node from its identifier, use [RigBuilder.GetBoneIndex](/engine/7000.0/script-reference/unity/animations/rigbuilder/getboneindex.md).
