# Sandbox.Npcs.Tasks.LookAtTask

Sets a persistent look target on the AnimationLayer and waits until the NPC is facing it.
The look target persists after this task completes - call [Sandbox.Npcs.Layers.AnimationLayer.ClearLookTarget](/api/Sandbox.Npcs.Layers.AnimationLayer/ClearLookTarget)
when you no longer need it (typically in [Sandbox.Npcs.Schedules.BaseSchedule.OnEnd](/api/Sandbox.Npcs.Schedules.BaseSchedule/OnEnd)).

- Kind: class
- Namespace: `Sandbox.Npcs.Tasks`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Npcs.Tasks.BaseTask](/api/Sandbox.Npcs.Tasks.BaseTask)

## Constructors

- [`LookAtTask`](/api/Sandbox.Npcs.Tasks.LookAtTask/.ctor)

## Properties

- [`TargetObject`](/api/Sandbox.Npcs.Tasks.LookAtTask/TargetObject): The object to look at, when the task was given one.
- [`TargetPosition`](/api/Sandbox.Npcs.Tasks.LookAtTask/TargetPosition): The point to look at, when the task was given a position.
