> For the complete documentation index, see [llms.txt](https://axongenesis.gitbook.io/timeflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axongenesis.gitbook.io/timeflow/reference/behaviors/automation/look-at-target.md).

# Look At Target

Designate an object as the global look at target

An object with this component automatically becomes the global target for all [Look At](/timeflow/reference/behaviors/automation/look-at.md) behaviors. Most commonly this is applied to the main camera or a player object.

{% hint style="info" %}
Look At Target is only used by [Look At](/timeflow/reference/behaviors/automation/look-at.md) instances using Global Target mode.
{% endhint %}

{% hint style="success" %}
To add Look At Target to the selected object, use the main menu:\
**Tools > Timeflow > Add > Look At Target**

Alternatively, right-click an object in the Timeflow view and select:

**Add Automation > Look At Target**&#x20;
{% endhint %}

{% hint style="info" %}
Look At Target does not require a [Timeflow Object](/timeflow/reference/timeflow-object.md) since it does not implement any Timeflow behaviors.&#x20;
{% endhint %}

## Look At Target Editor

Select the object to view it in the Inspector. There are no other settings for Look At Target.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FL4wQ654XgElgleWAeTZO%2Fimage.png?alt=media&amp;token=61ee77e0-b988-4689-b5fe-465680db9a58" alt=""><figcaption><p>When the object is the current global target, it displays an ACTIVE badge</p></figcaption></figure>

{% hint style="success" %}
**Moving Targets**\
An object with this component may be moved and reparented to dynamically direct the focus of objects looking at it over the course of animation and/or gameplay. This can be achieved by animating the object in Timeflow or with scripting.
{% endhint %}

## Multiple Targets

{% hint style="warning" %}
Multiple objects may have this component, however only 1 may be the active target at any given time. The most recently enabled Look At Target becomes the active one. Objects become active automatically during OnAwake and OnEnable.
{% endhint %}

When viewing an object that is not the active target, it displays a button to make it active and an object field with a reference to the currently active object, as shown below.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F1mvH39rVcTOZJ5ENfl5Q%2Fimage.png?alt=media&amp;token=f07f355b-3932-4578-9530-62d95d9a7e06" alt=""><figcaption><p>The object field cannot be edited, however double-clicking it selects and reveals the object in the hierarchy.</p></figcaption></figure>

## Scripting

It is also possible to set the global target in a script using the following code. See LookAt.cs

```
LookAt.GlobalTarget = myGameObject;
```
