---
name: "camSetTarget"
type: command
status: ok
groups: ["Camera Control"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/camSetTarget
revid: 369114
updated: 2024-09-03T10:28:47Z
---

# camSetTarget

*Command · Camera Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **local** · effect **local**

## Description

Set the target object or position where the given camera should point at. Needs the call of [camCommit](../commands/camCommit.md) to be conducted. To reset the target use [objNull](../commands/objNull.md).

## Syntax

### Syntax 1

```sqf
camera camSetTarget target
```

**Parameters:**

- `camera`: [Object](../topics/Object.md) - object of type "camera"
- `target`: [Object](../topics/Object.md) - target location

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

### Syntax 2

```sqf
camera camSetTarget position
```

**Parameters:**

- `camera`: [Object](../topics/Object.md) - object of type "camera"
- `position`: [Array](../topics/Array.md) - target location - [Position](../topics/Position.md)

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

## Examples

### Example 1

```sqf
_camera camSetTarget player;
```

### Example 2

```sqf
_camera camSetTarget [2540,1503,26];
```

### Example 3

```sqf
_cam = "camera" camCreate (player modelToWorld [0, 100, 10]);
_cam camSetTarget player;
_cam camSetRelPos [0, 0.5, 1.5];
_cam cameraEffect ["internal", "back"];
_cam camCommit 1;
player setRandomLip true;
```

## See also

[camCreate](../commands/camCreate.md) · [camTarget](../commands/camTarget.md)

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