# Move Mode and Mover

### MoveMode Enum

Type of interpolation to use for movement

### Syntax

\[Sansar.Script.Interface]\
public enum **MoveMode**

### Remarks

Movement is computed according to the movement type with a parametric parameter 't' that varies from zero to one.

* Linear movement is directly proportional to 't'.
* Ease-in movement is proportional to 't^2'.
* Ease-out movement is computed with 't\*(2-t)'.
* Smoothstep interpolation uses '(3-2t)\*t^2'.

### Members

| Member Name    | Description                                                                            |
| -------------- | -------------------------------------------------------------------------------------- |
| **EaseIn**     | Ease In. The object with move slowly at first and quickly at the end.                  |
| **EaseOut**    | Ease Out. The object with move quickly at first and slow down at the end.              |
| **Linear**     | Linear Interpolation. The object will move at a constant velocity.                     |
| **Smoothstep** | Smoothstep Interpolation. The object with speed up and slow down smoothly when moving. |

### Requirements

**Namespace:** Sansar.Simulation\
**Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
**Assembly Versions:** 1.1.0.0

***

### Mover Class

The Mover handles adding moves to process for an object.

### Syntax

### Member Details

#### AddMove Method

> Sets the transform of this Mover to a target World Space position and rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *position*
> >
> > The target position.
> >
> > *rotation*
> >
> > The target rotation.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMove Method

> Sets the transform of this Mover to a target World Space position and rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *position*
> >
> > The target position.
> >
> > *rotation*
> >
> > The target rotation.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMove Method

> Translate and rotate the Mover to the target World Space position and rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *targetPosition*
> >
> > The target position.
> >
> > *targetRotation*
> >
> > The target rotation.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMove Method

> Translate and rotate the Mover to the target World Space position and rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *targetPosition*
> >
> > The target position.
> >
> > *targetRotation*
> >
> > The target rotation.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMoveOffset Method

> Sets the transform of this Mover to a target Local Space position and rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *rotationOffset*
> >
> > The local space rotation offset.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMoveOffset Method

> Sets the transform of this Mover to a target Local Space position and rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *rotationOffset*
> >
> > The local space rotation offset.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMoveOffset Method

> Translate and rotate the Mover to the target Local Space position and rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *rotationOffset*
> >
> > The local space rotation offset.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddMoveOffset Method

> Translate and rotate the Mover to the target Local Space position and rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *rotationOffset*
> >
> > The local space rotation offset.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddPause Method

> Adds a pause of the given length for this Mover.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddPause** ([double](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double) timeInSeconds)
>
> **Parameters**
>
> > *timeInSeconds*
> >
> > The amount of time in seconds that the movement should be paused.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddPause Method

> Adds a pause of the given length for this Mover.
>
> #### Syntax
>
> **Parameters**
>
> > *timeInSeconds*
> >
> > The amount of time in seconds that the movement should be paused.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotate Method

> Sets the rotation of this Mover to a target World Space rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *rotation*
> >
> > The target rotation.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotate Method

> Sets the rotation of this Mover to a target World Space rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *rotation*
> >
> > The target rotation.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotate Method

> Rotate the Mover to the target World Space rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *targetRotation*
> >
> > The target rotation.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotate Method

> Rotate the Mover to the target World Space rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *targetRotation*
> >
> > The target rotation.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotateOffset Method

> Sets the rotation of this Mover to a target Local Space rotation.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddRotateOffset** ([Sansar.Quaternion](https://docs.sansar.com/latest/script-api-docs/sansar-namespace/quarterion) rotationOffset)
>
> **Parameters**
>
> > *rotationOffset*
> >
> > The local space rotation offset.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotateOffset Method

> Sets the rotation of this Mover to a target Local Space rotation.
>
> #### Syntax
>
> **Parameters**
>
> > *rotationOffset*
> >
> > The local space rotation offset.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotateOffset Method

> Rotate the Mover to the target Local Space rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *rotationOffset*
> >
> > The local space rotation offset.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddRotateOffset Method

> Rotate the Mover to the target Local Space rotation over time.
>
> #### Syntax
>
> **Parameters**
>
> > *rotationOffset*
> >
> > The local space rotation offset.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslate Method

> Sets the position of this Mover to a target World Space position.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddTranslate** ([Sansar.Vector](https://docs.sansar.com/latest/script-api-docs/sansar-namespace/vector) position)
>
> **Parameters**
>
> > *position*
> >
> > The target position.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslate Method

> Sets the position of this Mover to a target World Space position.
>
> #### Syntax
>
> **Parameters**
>
> > *position*
> >
> > The target position.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslate Method

> Translate the Mover to the target World Space position over time.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddTranslate** ([Sansar.Vector](https://docs.sansar.com/latest/script-api-docs/sansar-namespace/vector) targetPosition, [double](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double) timeInSeconds, [MoveMode](https://help.sansar.com/hc/en-us/articles/360027482112) interpolationMode)
>
> **Parameters**
>
> > *targetPosition*
> >
> > The target position.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslate Method

> Translate the Mover to the target World Space position over time.
>
> #### Syntax
>
> **Parameters**
>
> > *targetPosition*
> >
> > The target position.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslateOffset Method

> Sets the position of this Mover to a target Local Space position.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddTranslateOffset** ([Sansar.Vector](https://docs.sansar.com/latest/script-api-docs/sansar-namespace/vector) positionOffset)
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslateOffset Method

> Sets the position of this Mover to a target Local Space position.
>
> #### Syntax
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslateOffset Method

> Translate the Mover to the target Local Space position over time.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddTranslateOffset** ([Sansar.Vector](https://docs.sansar.com/latest/script-api-docs/sansar-namespace/vector) positionOffset, [double](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Double) timeInSeconds, [MoveMode](https://help.sansar.com/hc/en-us/articles/360027482112) interpolationMode)
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddTranslateOffset Method

> Translate the Mover to the target Local Space position over time.
>
> #### Syntax
>
> **Parameters**
>
> > *positionOffset*
> >
> > The local space position offset.
> >
> > *timeInSeconds*
> >
> > The time in seconds to move over.
> >
> > *interpolationMode*
> >
> > The method of interpolation to use when moving.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### IsMoving Property

> Property to check if a move command is currently executing for this Mover.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **IsMoving** { get; }
>
> **Value**
>
> > Whether or not this object is currently executing a move (includes pauses).
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### MoveCount Property

> The number of move commands waiting to be excuted and currently executing for this Mover.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) **MoveCount** { get; }
>
> **Value**
>
> > The number of enqueued move commands. Includes the current active move and any pause commands.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### StopAndClear Method

> Stops the current movement and clears any further movements for this Mover.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **StopAndClear** ()
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> This method is not enqueued like other operations on the Mover. To block until the operation has executed, pass this method to [Sansar.Script.ScriptBase.WaitFor](https://help.sansar.com/hc/en-us/articles/115003549048#M:Sansar.Script.ScriptBase.WaitFor) while in a coroutine.
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### StopAndClear Method

> Stops the current movement and clears any further movements for this Mover.
>
> #### Syntax
>
> **Parameters**
>
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> This method is not enqueued like other operations on the Mover. To block until the operation has executed, pass this method to [Sansar.Script.ScriptBase.WaitFor](https://help.sansar.com/hc/en-us/articles/115003549048#M:Sansar.Script.ScriptBase.WaitFor) while in a coroutine.
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***
