---
name: "camCommit"
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/camCommit
revid: 325309
updated: 2022-07-10T23:02:07Z
---

# camCommit

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

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

## Description

Smoothly conduct the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately. For `camPrepareXXX` commands use [camCommitPrepared](../commands/camCommitPrepared.md).

## Syntax

```sqf
camera camCommit time
```

**Parameters:**

- `camera`: [Object](../topics/Object.md) - object of type "camera"
- `time`: [Number](../topics/Number.md) - time in seconds during which the changes shall be done

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

## Examples

### Example 1

SQS Syntax:

```sqs
; create a camera object
_cam = "camera" camCreate [5600,4800,10]
_cam camSetTarget player
_cam cameraEffect ["internal", "BACK"]
_cam camCommit 0

; smoothly move the camera to its new position in 6 seconds
_cam camSetPos [5680,4720,20]
_cam camCommit 6
@camCommitted _cam

; proceed
```

### Example 2

[SQF Syntax](../topics/SQF_Syntax.md):

```sqf
private "_cam";

// create a camera object
_cam = "camera" camCreate [position player select 0, position player select 1, 2];
_cam camSetTarget player;
_cam cameraEffect ["internal", "BACK"];
_cam camCommit 0;

// smoothly move the camera to its new position in 6 seconds
_cam camSetPos [position player select 0, (position player select 1) + 10, 20];
_cam camCommit 6;
waitUntil { camCommitted _cam; };
```

## See also

[camCommitted](../commands/camCommitted.md) · [camCommitPrepared](../commands/camCommitPrepared.md)

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