# SetTranslationOffset(int, Vector3)

> Sets the translation offset associated with a source by index.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Animations](/engine/6000.5/script-reference/unityengine/animations.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
public void SetTranslationOffset(int index, Vector3 value)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the constraint source.**** (\[Vector3]\(/engine/6000.5/script-reference/unityengine/vector3)): The new translation offset.

### Remarks

Throws InvalidOperationException, if the list of sources is empty. Throws ArgumentOutOfRangeException, if the index is invalid.
