# Mover

Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-class" data-pagefind-filter="kind:Class">Class</span>
<span data-pagefind-filter="namespace:Sansar.Simulation">Namespace <a href="/scripting/api/sansar.simulation"><code>Sansar.Simulation</code></a></span>
<span>Inherits <a href="/scripting/api/sansar.script/instanceinterface">Sansar.Script.InstanceInterface</a></span>
<span class="api-badge api-since">Added in 32.0.0</span>
</div>

<span id="T:Sansar.Simulation.Mover"></span>

The Mover handles adding moves to process for an object.

```csharp
public class Mover : Sansar.Script.InstanceInterface
```

## Remarks

The Movable From Script flag must be set to true in the editor to use the Mover. Additionally, player characters and rigid bodies with Static or Dynamic motion types cannot be moved using the Mover. Unlike the RigidBodyComponent movement functions, the Mover can be applied to objects that do not contain Volumes.

## Members at a glance

| Kind | Members |
|---|---|
| **Properties** | [IsMoving](#ismoving) · [MoveCount](#movecount) |
| **Methods** | [AddMove](#addmove)&#160;<span class="api-dot" title="New in 47.10.0"><span class="api-sr">New in 47.10.0</span></span> · [AddMoveOffset](#addmoveoffset)&#160;<span class="api-dot" title="New in 47.10.0"><span class="api-sr">New in 47.10.0</span></span> · [AddPause](#addpause) · [AddRotate](#addrotate) · [AddRotateOffset](#addrotateoffset) · [AddTranslate](#addtranslate) · [AddTranslateOffset](#addtranslateoffset) · [StopAndClear](#stopandclear) · [ToString](#tostring) |

## Properties

### IsMoving

<div class="api-card">
<span id="P:Sansar.Simulation.Mover.IsMoving"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public bool IsMoving { get; }
```

Property to check if a move command is currently executing for this Mover.

**Value:** [bool](https://learn.microsoft.com/dotnet/api/system.boolean) — Whether or not this object is currently executing a move (includes pauses).

</div>

### MoveCount

<div class="api-card">
<span id="P:Sansar.Simulation.Mover.MoveCount"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public int MoveCount { get; }
```

The number of move commands waiting to be excuted and currently executing for this Mover.

**Value:** [int](https://learn.microsoft.com/dotnet/api/system.int32) — The number of enqueued move commands. Includes the current active move and any pause commands.

</div>


## Methods

### AddMove

<div class="api-card" id="addmove-vector-quaternion">
<span id="M:Sansar.Simulation.Mover.AddMove(Sansar.Vector,Sansar.Quaternion)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddMove(
    Sansar.Vector position,
    Sansar.Quaternion rotation
)
```

Sets the transform of this Mover to a target World Space position and rotation.

| Parameter | Type | Description |
|---|---|---|
| `position` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `rotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmove-vector-quaternion-action">
<span id="M:Sansar.Simulation.Mover.AddMove(Sansar.Vector,Sansar.Quaternion,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddMove(
    Sansar.Vector position,
    Sansar.Quaternion rotation,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Sets the transform of this Mover to a target World Space position and rotation.

| Parameter | Type | Description |
|---|---|---|
| `position` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `rotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmove-vector-quaternion-double-movemode">
<span id="M:Sansar.Simulation.Mover.AddMove(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddMove(
    Sansar.Vector targetPosition,
    Sansar.Quaternion targetRotation,
    double timeInSeconds,
    MoveMode interpolationMode
)
```

Translate and rotate the Mover to the target World Space position and rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `targetPosition` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `targetRotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmove-vector-quaternion-double-movemode-movemode">
<span id="M:Sansar.Simulation.Mover.AddMove(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-new">New in 47.10.0</span></div>

```csharp signature
public void AddMove(
    Sansar.Vector targetPosition,
    Sansar.Quaternion targetRotation,
    double timeInSeconds,
    MoveMode translationMode,
    MoveMode rotationMode
)
```

Translate and rotate the Mover to the target World Space position and rotation over time, using separate interpolation modes.

| Parameter | Type | Description |
|---|---|---|
| `targetPosition` | [Sansar.Vector](/scripting/api/sansar/vector) | The target world space position. |
| `targetRotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target world space rotation. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The shared duration in seconds for translation and rotation. |
| `translationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to translation only. |
| `rotationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to rotation only. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues one combined move command then returns. Translation and rotation run together for the same duration and share one completion event. To block until both have completed, pass a lambda that calls the handler overload to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmove-vector-quaternion-double-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddMove(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddMove(
    Sansar.Vector targetPosition,
    Sansar.Quaternion targetRotation,
    double timeInSeconds,
    MoveMode interpolationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Translate and rotate the Mover to the target World Space position and rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `targetPosition` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `targetRotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmove-vector-quaternion-double-movemode-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddMove(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-new">New in 47.10.0</span></div>

```csharp signature
public void AddMove(
    Sansar.Vector targetPosition,
    Sansar.Quaternion targetRotation,
    double timeInSeconds,
    MoveMode translationMode,
    MoveMode rotationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Translate and rotate the Mover to the target World Space position and rotation over time, using separate interpolation modes.

| Parameter | Type | Description |
|---|---|---|
| `targetPosition` | [Sansar.Vector](/scripting/api/sansar/vector) | The target world space position. |
| `targetRotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target world space rotation. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The shared duration in seconds for translation and rotation. |
| `translationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to translation only. |
| `rotationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to rotation only. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues one combined move command then returns. Translation and rotation run together for the same duration and share one completion event. To block until both have completed, pass a lambda that calls the handler overload to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### AddMoveOffset

<div class="api-card" id="addmoveoffset-vector-quaternion">
<span id="M:Sansar.Simulation.Mover.AddMoveOffset(Sansar.Vector,Sansar.Quaternion)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddMoveOffset(
    Sansar.Vector positionOffset,
    Sansar.Quaternion rotationOffset
)
```

Sets the transform of this Mover to a target Local Space position and rotation.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmoveoffset-vector-quaternion-action">
<span id="M:Sansar.Simulation.Mover.AddMoveOffset(Sansar.Vector,Sansar.Quaternion,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddMoveOffset(
    Sansar.Vector positionOffset,
    Sansar.Quaternion rotationOffset,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Sets the transform of this Mover to a target Local Space position and rotation.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmoveoffset-vector-quaternion-double-movemode">
<span id="M:Sansar.Simulation.Mover.AddMoveOffset(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddMoveOffset(
    Sansar.Vector positionOffset,
    Sansar.Quaternion rotationOffset,
    double timeInSeconds,
    MoveMode interpolationMode
)
```

Translate and rotate the Mover to the target Local Space position and rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmoveoffset-vector-quaternion-double-movemode-movemode">
<span id="M:Sansar.Simulation.Mover.AddMoveOffset(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-new">New in 47.10.0</span></div>

```csharp signature
public void AddMoveOffset(
    Sansar.Vector positionOffset,
    Sansar.Quaternion rotationOffset,
    double timeInSeconds,
    MoveMode translationMode,
    MoveMode rotationMode
)
```

Translate and rotate the Mover by Local Space offsets over time, using separate interpolation modes.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset from the final queued target transform. |
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset from the final queued target transform. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The shared duration in seconds for translation and rotation. |
| `translationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to translation only. |
| `rotationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to rotation only. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues one combined move command then returns. Translation is applied in local space before the rotation offset, relative to the final queued target transform. Translation and rotation run together for the same duration and share one completion event. To block until both have completed, pass a lambda that calls the handler overload to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmoveoffset-vector-quaternion-double-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddMoveOffset(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddMoveOffset(
    Sansar.Vector positionOffset,
    Sansar.Quaternion rotationOffset,
    double timeInSeconds,
    MoveMode interpolationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Translate and rotate the Mover to the target Local Space position and rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addmoveoffset-vector-quaternion-double-movemode-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddMoveOffset(Sansar.Vector,Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-new">New in 47.10.0</span></div>

```csharp signature
public void AddMoveOffset(
    Sansar.Vector positionOffset,
    Sansar.Quaternion rotationOffset,
    double timeInSeconds,
    MoveMode translationMode,
    MoveMode rotationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Translate and rotate the Mover by Local Space offsets over time, using separate interpolation modes.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset from the final queued target transform. |
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset from the final queued target transform. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The shared duration in seconds for translation and rotation. |
| `translationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to translation only. |
| `rotationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The interpolation mode applied to rotation only. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues one combined move command then returns. Translation is applied in local space before the rotation offset, relative to the final queued target transform. Translation and rotation run together for the same duration and share one completion event. To block until both have completed, pass a lambda that calls the handler overload to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### AddPause

<div class="api-card" id="addpause-double">
<span id="M:Sansar.Simulation.Mover.AddPause(System.Double)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddPause(double timeInSeconds)
```

Adds a pause of the given length for this Mover.

| Parameter | Type | Description |
|---|---|---|
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The amount of time in seconds that the movement should be paused. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addpause-double-action">
<span id="M:Sansar.Simulation.Mover.AddPause(System.Double,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddPause(
    double timeInSeconds,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Adds a pause of the given length for this Mover.

| Parameter | Type | Description |
|---|---|---|
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The amount of time in seconds that the movement should be paused. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### AddRotate

<div class="api-card" id="addrotate-quaternion">
<span id="M:Sansar.Simulation.Mover.AddRotate(Sansar.Quaternion)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddRotate(Sansar.Quaternion rotation)
```

Sets the rotation of this Mover to a target World Space rotation.

| Parameter | Type | Description |
|---|---|---|
| `rotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addrotate-quaternion-action">
<span id="M:Sansar.Simulation.Mover.AddRotate(Sansar.Quaternion,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddRotate(
    Sansar.Quaternion rotation,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Sets the rotation of this Mover to a target World Space rotation.

| Parameter | Type | Description |
|---|---|---|
| `rotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addrotate-quaternion-double-movemode">
<span id="M:Sansar.Simulation.Mover.AddRotate(Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddRotate(
    Sansar.Quaternion targetRotation,
    double timeInSeconds,
    MoveMode interpolationMode
)
```

Rotate the Mover to the target World Space rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `targetRotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addrotate-quaternion-double-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddRotate(Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddRotate(
    Sansar.Quaternion targetRotation,
    double timeInSeconds,
    MoveMode interpolationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Rotate the Mover to the target World Space rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `targetRotation` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The target rotation. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### AddRotateOffset

<div class="api-card" id="addrotateoffset-quaternion">
<span id="M:Sansar.Simulation.Mover.AddRotateOffset(Sansar.Quaternion)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddRotateOffset(Sansar.Quaternion rotationOffset)
```

Sets the rotation of this Mover to a target Local Space rotation.

| Parameter | Type | Description |
|---|---|---|
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addrotateoffset-quaternion-action">
<span id="M:Sansar.Simulation.Mover.AddRotateOffset(Sansar.Quaternion,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddRotateOffset(
    Sansar.Quaternion rotationOffset,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Sets the rotation of this Mover to a target Local Space rotation.

| Parameter | Type | Description |
|---|---|---|
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addrotateoffset-quaternion-double-movemode">
<span id="M:Sansar.Simulation.Mover.AddRotateOffset(Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddRotateOffset(
    Sansar.Quaternion rotationOffset,
    double timeInSeconds,
    MoveMode interpolationMode
)
```

Rotate the Mover to the target Local Space rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addrotateoffset-quaternion-double-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddRotateOffset(Sansar.Quaternion,System.Double,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddRotateOffset(
    Sansar.Quaternion rotationOffset,
    double timeInSeconds,
    MoveMode interpolationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Rotate the Mover to the target Local Space rotation over time.

| Parameter | Type | Description |
|---|---|---|
| `rotationOffset` | [Sansar.Quaternion](/scripting/api/sansar/quaternion) | The local space rotation offset. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### AddTranslate

<div class="api-card" id="addtranslate-vector">
<span id="M:Sansar.Simulation.Mover.AddTranslate(Sansar.Vector)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddTranslate(Sansar.Vector position)
```

Sets the position of this Mover to a target World Space position.

| Parameter | Type | Description |
|---|---|---|
| `position` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addtranslate-vector-action">
<span id="M:Sansar.Simulation.Mover.AddTranslate(Sansar.Vector,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddTranslate(
    Sansar.Vector position,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Sets the position of this Mover to a target World Space position.

| Parameter | Type | Description |
|---|---|---|
| `position` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addtranslate-vector-double-movemode">
<span id="M:Sansar.Simulation.Mover.AddTranslate(Sansar.Vector,System.Double,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddTranslate(
    Sansar.Vector targetPosition,
    double timeInSeconds,
    MoveMode interpolationMode
)
```

Translate the Mover to the target World Space position over time.

| Parameter | Type | Description |
|---|---|---|
| `targetPosition` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addtranslate-vector-double-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddTranslate(Sansar.Vector,System.Double,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void AddTranslate(
    Sansar.Vector targetPosition,
    double timeInSeconds,
    MoveMode interpolationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Translate the Mover to the target World Space position over time.

| Parameter | Type | Description |
|---|---|---|
| `targetPosition` | [Sansar.Vector](/scripting/api/sansar/vector) | The target position. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### AddTranslateOffset

<div class="api-card" id="addtranslateoffset-vector">
<span id="M:Sansar.Simulation.Mover.AddTranslateOffset(Sansar.Vector)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddTranslateOffset(Sansar.Vector positionOffset)
```

Sets the position of this Mover to a target Local Space position.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addtranslateoffset-vector-action">
<span id="M:Sansar.Simulation.Mover.AddTranslateOffset(Sansar.Vector,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddTranslateOffset(
    Sansar.Vector positionOffset,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Sets the position of this Mover to a target Local Space position.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addtranslateoffset-vector-double-movemode">
<span id="M:Sansar.Simulation.Mover.AddTranslateOffset(Sansar.Vector,System.Double,Sansar.Simulation.MoveMode)"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddTranslateOffset(
    Sansar.Vector positionOffset,
    double timeInSeconds,
    MoveMode interpolationMode
)
```

Translate the Mover to the target Local Space position over time.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="addtranslateoffset-vector-double-movemode-action">
<span id="M:Sansar.Simulation.Mover.AddTranslateOffset(Sansar.Vector,System.Double,Sansar.Simulation.MoveMode,System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 33.2.0</span></div>

```csharp signature
public void AddTranslateOffset(
    Sansar.Vector positionOffset,
    double timeInSeconds,
    MoveMode interpolationMode,
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Translate the Mover to the target Local Space position over time.

| Parameter | Type | Description |
|---|---|---|
| `positionOffset` | [Sansar.Vector](/scripting/api/sansar/vector) | The local space position offset. |
| `timeInSeconds` | [double](https://learn.microsoft.com/dotnet/api/system.double) | The time in seconds to move over. |
| `interpolationMode` | [MoveMode](/scripting/api/sansar.simulation/movemode) | The method of interpolation to use when moving. |
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This asynchronous method queues this command then returns. To block until this move command has been executed and completed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### StopAndClear

<div class="api-card" id="stopandclear-noargs">
<span id="M:Sansar.Simulation.Mover.StopAndClear"></span>
<span id="M:Sansar.Simulation.Mover.StopAndClear()"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void StopAndClear()
```

Stops the current movement and clears any further movements for this Mover.

<details class="api-remarks"><summary>Remarks</summary>

This method is not enqueued like other operations on the Mover. To block until the operation has executed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

<div class="api-card" id="stopandclear-action">
<span id="M:Sansar.Simulation.Mover.StopAndClear(System.Action{Sansar.Script.OperationCompleteEvent})"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public void StopAndClear(
    Action<Sansar.Script.OperationCompleteEvent> handler
)
```

Stops the current movement and clears any further movements for this Mover.

| Parameter | Type | Description |
|---|---|---|
| `handler` | [Action&lt;Sansar.Script.OperationCompleteEvent&gt;](https://learn.microsoft.com/dotnet/api/system.action-1) | Handler to be called when the event completes. |

<details class="api-remarks"><summary>Remarks</summary>

This method is not enqueued like other operations on the Mover. To block until the operation has executed, pass this method to [`ScriptBase.WaitFor`](/scripting/api/sansar.script/scriptbase#waitfor) while in a coroutine.

</details>

</div>

### ToString

<div class="api-card">
<span id="M:Sansar.Simulation.Mover.ToString"></span>
<span id="M:Sansar.Simulation.Mover.ToString()"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 32.0.0</span></div>

```csharp signature
public override string ToString()
```

A string representation of this object.

**Returns:** [string](https://learn.microsoft.com/dotnet/api/system.string) — A string representation of this object.

<details class="api-remarks"><summary>Remarks</summary>

The format of this string may change between releases.

</details>

</div>


## Used in examples

- [MoverExample1.cs](/scripting/examples/mover-examples)
- [MoverExample2.cs](/scripting/examples/mover-examples)
- [MoverExample3.cs](/scripting/examples/mover-examples)
- `MoverExample4.cs`
- [ScriptLibrary/Scene/KeyframedMotion.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/KeyframedMotion.cs)
- [ScriptLibrary/Scene/Mover.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Mover.cs)

<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>