# Sandbox.Npcs.Tasks.MoveToTask

Commands the NPC's movement layer to a position or GameObject, periodically updating a moving target's path.
Leaves the look target unchanged; the movement layer controls facing.

- Kind: class
- Namespace: `Sandbox.Npcs.Tasks`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Npcs.Tasks.BaseTask](/api/Sandbox.Npcs.Tasks.BaseTask)

## Constructors

- [`MoveToTask`](/api/Sandbox.Npcs.Tasks.MoveToTask/.ctor)

## Properties

- [`FaceTarget`](/api/Sandbox.Npcs.Tasks.MoveToTask/FaceTarget): Keep facing this object while moving instead of turning into the movement direction. The NPC backpedals or strafes -- short moves away from someone happen without turning our back on them.
- [`Speed`](/api/Sandbox.Npcs.Tasks.MoveToTask/Speed): Movement speed for this task. Null uses the NPC's configured speed.
- [`StopDistance`](/api/Sandbox.Npcs.Tasks.MoveToTask/StopDistance): How close to the target counts as arrived.
- [`TargetObject`](/api/Sandbox.Npcs.Tasks.MoveToTask/TargetObject): The object to move to, followed as it moves, when the task was given one.
- [`TargetPosition`](/api/Sandbox.Npcs.Tasks.MoveToTask/TargetPosition): The point to move to, when the task was given a position.
