---
title: TrySetDefaultTranslation(StringHash, float3)
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/trysetdefaulttranslation
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetdefaulttranslation.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:53:05.555Z
locale: en-us
---

# TrySetDefaultTranslation(StringHash, float3)

> Sets the default value of the translation channel that has an identifier.

## 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 TrySetDefaultTranslation(StringHash id, float3 translation)
```

### Parameters

**** (\[StringHash]\(/engine/7000.0/script-reference/unity/animations/stringhash)): The identifier of the channel.**** (\[float3]\(/engine/7000.0/script-reference/unity/mathematics/float3)): The default translation of the channel.

### Returns

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

### Remarks

The method only searches the channels that you add with [RigBuilder.Add](/engine/7000.0/script-reference/unity/animations/rigbuilder/add.md). To set the default translation of a bone, use [RigBuilder.TrySetBoneDefaultTranslation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaulttranslation.md).
