---
name: "cameraEffect"
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/cameraEffect
revid: 336915
updated: 2023-01-04T16:43:59Z
---

# cameraEffect

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

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

## Description

Sets the given effect on the given camera. If you want to switch the screen directly to the first-person, aiming, third-person or group view of an object, use [switchCamera](../commands/switchCamera.md) instead. The effect type "Terminate" is used to exit the current camera view and switch back to the player's view. Does not need [camCommit](../commands/camCommit.md).

Since Arma 3 v1.74, it is possible to terminate individual r2t source. For example:

```sqf
cam cameraEffect ["terminate", "back", "rtt1"]; // would terminate "rtt1" r2t source
cam cameraEffect ["terminate", "back"]; // would terminate all r2t sources
```

> [!IMPORTANT]
> One cannot mix and match [cameraEffect](../commands/cameraEffect.md) and can either have multiple r2t cameras or a single camera for the whole screen.
> If one needs a background stream overlayed with r2t streams, this could be achieved by creating an object and using [switchCamera](../commands/switchCamera.md) to switch to it for background image, while using [cameraEffect](../commands/cameraEffect.md) for r2t overlay (see [#Example 4](../commands/cameraEffect.md#example-4)).

## Syntax

```sqf
camera cameraEffect [effectName, effectPosition, r2tName]
```

**Parameters:**

- `camera`: [Object](../topics/Object.md) - object of type "camera"
- `effectName`: [String](../topics/String.md) - the effect type (defined in main config or [CfgCameraEffects](../topics/Description.ext.md#cfgcameraeffects) >> Array). Defaults are: `"Internal"`, `"External"`, `"Fixed"`, `"FixedWithZoom"`, `"Terminate"`
- `effectPosition`: [String](../topics/String.md) - position of the effect. Can be one of:
  - `"TOP"`
  - `"LEFT"`
  - `"RIGHT"`
  - `"FRONT"`
  - `"BACK"`
  - `"LEFT FRONT"`
  - `"RIGHT FRONT"`
  - `"LEFT BACK"`
  - `"RIGHT BACK"`
  - `"LEFT TOP"`
  - `"RIGHT TOP"`
  - `"FRONT TOP"`
  - `"BACK TOP"`
  - `"BOTTOM"`
  These are usually used with "Fixed" and "FixedWithZoom" effect types. If not sure which position to use, set it to `"BACK"`.
- `r2tName`: [String](../topics/String.md) - (Optional) Render To Texture surface reference

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

## Examples

### Example 1

```sqf
_cam cameraEffect ["internal", "BACK"];
```

### Example 2

```sqf
_cam cameraEffect ["internal", "back", "rendersurface"];
```

### Example 3

```sqf
cam = "seagull" camCreate (player modelToWorld [0,0,100]);
cam cameraEffect ["FIXED", "LEFT TOP"];
cam camCommand "MANUAL ON";
```

### Example 4

```sqf
_ctrl = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscPicture", -1];
_ctrl ctrlSetPosition [0.5, 0, 0.5, 0.5];
_ctrl ctrlSetText "#(argb,512,512,1)r2t(rtt1,1.0)";
_ctrl ctrlCommit 0;
_cam1 = "camera" camCreate (ASLToAGL eyePos player vectorAdd [0, -10, 0]);
_cam1 cameraEffect ["Internal", "Back", "rtt1"];
_cam2 = "Land_HandyCam_F" createVehicle [0,0,0];
_cam2 enableSimulation false;
_cam2 setPos (ASLToAGL eyePos player vectorAdd [0, 10, 0]);
_cam2 setDir (_cam2 getDir player);
switchCamera _cam2;
```

## See also

[switchCamera](../commands/switchCamera.md) · [cameraView](../commands/cameraView.md) · [cameraOn](../commands/cameraOn.md) · [setPiPEffect](../commands/setPiPEffect.md) · [camCreate](../commands/camCreate.md) · [cameraEffectEnableHUD](../commands/cameraEffectEnableHUD.md) · [camUseNVG](../commands/camUseNVG.md) · [setCamUseTI](../commands/setCamUseTI.md)

## Community notes

**Killzone_Kid** — 2016-10-30

Types of camera for [CfgCameraEffects](../topics/Description.ext.md#cfgcameraeffects) config:
- CamExternal (CamInterpolated)  // linked directly with object
- CamStatic  // fixed point in space
- CamStaticWithZoom  // fixed point in space
- CamChained  // chained
- CamTerminate  // terminate
- CamInternal  // internal view

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