---
name: "worldToScreen"
type: command
status: ok
groups: ["Positions"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/worldToScreen
revid: 377903
updated: 2026-01-05T18:00:13Z
---

# worldToScreen

*Command · Positions · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Converts position in world space into screen (UI) space. If a specified position is not within the current screen view, an empty array is returned.

> [!NOTE]
> SafeZones should be considered:
> - the result can be out of the [0,0]..[1,1] range
> - the result can be a filled array even if the position is not displayed on screen if it would appear on a triplescreen setup

## Syntax

### Syntax 1

```sqf
worldToScreen position
```

**Parameters:**

- `position`: [Position2D](../topics/Position.md#position2d), [PositionAGL](../topics/Position.md#positionagl)

**Returns:** [Array](../topics/Array.md) with [x, y] - screen position in SafeZone. Returns an empty array `[]` if not on-screen.
- x: [Number](../topics/Number.md)
- y: [Number](../topics/Number.md)

### Syntax 2

*since arma3 2.18*

```sqf
camera worldToScreen position
```

**Parameters:**

- `camera`: [Object](../topics/Object.md) - camera object
- `position`: [Position2D](../topics/Position.md#position2d), [PositionAGL](../topics/Position.md#positionagl)

**Returns:** [Array](../topics/Array.md) with [x, y] - screen position in SafeZone. Returns an empty array `[]` if not on-screen.
- x: [Number](../topics/Number.md)
- y: [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
_screenPos = worldToScreen ASLToAGL getPosASL soldier1;
```

### Example 2

```sqf
_screenPos = worldToScreen (player modelToWorld [0,10,0]);
```

## See also

[screenToWorld](../commands/screenToWorld.md) · SafeZone

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