---
name: "setFormDir"
type: command
status: ok
groups: ["Groups"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setFormDir
revid: 369299
updated: 2024-09-03T18:42:52Z
---

# setFormDir

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

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

## Description

Sets group formation heading. Accepted heading range is 0 to 360. Formation is facing this direction unless enemy is seen. When group is moving, this value is overridden by movement direction. If the new direction is noticeably different from the old direction (approx +/- 15 degrees), units will change positions changing [formationDirection](../commands/formationDirection.md).

## Syntax

```sqf
group setFormDir heading
```

**Parameters:**

- `group`: [Object](../topics/Object.md) or [Group](../topics/Group.md)
- `heading`: [Number](../topics/Number.md)

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

## Examples

### Example 1

```sqf
_group1 setFormDir 180;
```

### Example 2

```sqf
_unit1 setFormDir random 360;
```

### Example 3

```sqf
//center the main turret
(group BIS_Crew1) setFormDir (getDir BIS_Armor);
```

## See also

[setDir](../commands/setDir.md) · [setVectorDir](../commands/setVectorDir.md) · [setVectorDirAndUp](../commands/setVectorDirAndUp.md) · [resetSubgroupDirection](../commands/resetSubgroupDirection.md) · [formation](../commands/formation.md) · [formationLeader](../commands/formationLeader.md) · [formationMembers](../commands/formationMembers.md) · [formationTask](../commands/formationTask.md) · [formationDirection](../commands/formationDirection.md) · [formationPosition](../commands/formationPosition.md)

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