---
name: "getAimDirectionAndUp"
type: command
status: ok
groups: ["Object Manipulation", "Render Time Scope"]
arma3_since: "2.22"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getAimDirectionAndUp
revid: 378285
updated: 2026-03-31T10:14:52Z
---

# getAimDirectionAndUp

*Command · Object Manipulation, Render Time Scope · Arma 3 v2.22*

Locality: arguments **global**

## Description

Returns the aim direction and up vectors of a soldier in model space. It returns where the weapon aim is wanted from the [eyePos](../commands/eyePos.md), not the actual weapon direction. For actual weapon direction, see [weaponDirection](../commands/weaponDirection.md).

## Syntax

```sqf
getAimDirectionAndUp [soldier, isRenderScope]
```

**Parameters:**

- `soldier`: [Object](../topics/Object.md) - The soldier entity. The soldier must either be on foot or in a turret.
- `isRenderScope`: [Boolean](../topics/Boolean.md) - (Optional, default false) Whether to use render scope to get the vector. (render scope is smoother for visualizing the vector in 3D)

**Returns:** [Array](../topics/Array.md) - in format [directionForward, directionUp] in soldier's model space

## Examples

### Example 1

```sqf
onEachFrame
{
    getAimDirectionAndUp [player] params ["_dir", "_up"];
    private _dirWS = player vectorModelToWorld _dir;
    private _upWS = player vectorModelToWorld _up;
    private _eyePos = eyePos player;
    drawLine3D [ASLtoAGL _eyePos, ASLtoAGL (_eyePos vectorAdd _dirWS), [1,0,0,1]];
}
```

## See also

[weaponDirection](../commands/weaponDirection.md) · [eyeDirection](../commands/eyeDirection.md) · [positionCameraToWorld](../commands/positionCameraToWorld.md) · [eyePos](../commands/eyePos.md)

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