---
name: "lookAt"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/lookAt
revid: 369219
updated: 2024-09-03T10:34:54Z
---

# lookAt

*Command · Unit Control · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

## Description

Control what the unit(s) is/are looking at (target or [Position](../topics/Position.md)). If target is used, it will get revealed fully.

## Syntax

```sqf
unit(s) lookAt position
```

**Parameters:**

- `unit(s)`: [Object](../topics/Object.md) or [Array](../topics/Array.md) of [Object](../topics/Object.md)s
- `position`: [Object](../topics/Object.md) or [PositionAGL](../topics/Position.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
_someSoldier lookAt _otherSoldier;
```

### Example 2

```sqf
[_someSoldier, _otherSoldier] lookAt markerPos "markerOne";
```

### Example 3

```sqf
hint "R U N !";
BFG = "B_AAA_System_01_F" createVehicle position player;
createVehicleCrew BFG;
t = time + 10;
onEachFrame
{
    BFG lookAt (unitAimPosition player vectorAdd (velocity player vectorMultiply 0.2));
    if (time > t && alive player) then
    {
        [BFG,"weapon_Cannon_Phalanx",[0]] call BIS_fnc_fire;
    };
};
```

## See also

[glanceAt](../commands/glanceAt.md) · [commandWatch](../commands/commandWatch.md) · [doWatch](../commands/doWatch.md) · [freeLook](../commands/freeLook.md)

<sub>Source: [BI Community Wiki — lookAt](https://community.bistudio.com/wiki/lookAt) (revision 369219).</sub>
