---
name: "setVelocity"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setVelocity
revid: 378408
updated: 2026-04-04T08:14:56Z
---

# setVelocity

*Command · Object Manipulation · Arma 3 v0.50 · introduced in Operation Flashpoint v1.80*

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

## Description

Sets [velocity](../commands/velocity.md) vector of an object in m/s.

> [!IMPORTANT]
> Since Arma 3 v2.06 each velocity component is limited to the range +-5000 m/s.

## Syntax

```sqf
object setVelocity vector
```

**Parameters:**

- `object`: [Object](../topics/Object.md)
- `vector`: [Vector3D](../topics/Vector3D.md)

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

## Examples

### Example 1

```sqf
_truck1 setVelocity [20, 0, 0];
```

### Example 2

Advanced method used for relative acceleration:

```sqf
_vel = velocity _vehicle;
_dir = getDir _vehicle;
_additionalSpeed = 10; // in m/s
_vehicle setVelocity [
    (_vel select 0) + (sin _dir * _additionalSpeed), 
    (_vel select 1) + (cos _dir * _additionalSpeed), 
    (_vel select 2) // horizontal only
];
```

## See also

[velocity](../commands/velocity.md) · [velocityModelSpace](../commands/velocityModelSpace.md) · [setVelocityModelSpace](../commands/setVelocityModelSpace.md) · [setVelocityTransformation](../commands/setVelocityTransformation.md) · [speed](../commands/speed.md)

## Community notes

**ffur2007slx2_5** — 2014-06-20

Arma 3 v1.22 [setVelocity](../commands/setVelocity.md) will be affected by [setDir](../commands/setDir.md) and [setVectorDirAndUp](../commands/setVectorDirAndUp.md), so use it after them.

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