---
name: "getRelPos"
type: command
status: ok
groups: ["Positions"]
arma3_since: "1.56"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getRelPos
revid: 377397
updated: 2026-01-02T06:44:48Z
---

# getRelPos

*Command · Positions · Arma 3 v1.56*

Locality: arguments **global**

## Description

Returns position that is given distance and relative direction away from original object. The alternative syntax available from Arma 3 v 2.14, returns the position offset of the attached object. If the animated memory point is used for attachment, the offset is calculated in render scope.

## Syntax

### Syntax 1

```sqf
object getRelPos [distance, direction]
```

**Parameters:**

- `object`: [Object](../topics/Object.md) - object
- `distance`: [Number](../topics/Number.md) - distance from object
- `direction`: [Number](../topics/Number.md) - direction relative to object's current direction

**Returns:** [PositionAGL](../topics/Position.md#positionagl)

### Syntax 2

*since arma3 2.14*

```sqf
obj1 getRelPos obj2
```

**Parameters:**

- `obj1`: [Object](../topics/Object.md) - parent object
- `obj2`: [Object](../topics/Object.md) - attached object

**Returns:** [PositionRelative](../topics/Position.md#positionrelative)

## Examples

### Example 1

Find position 100 metres away at player's 3 o'clock:

```sqf
_relpos = player getRelPos [100, 90];
```

## See also

[getPos](../commands/getPos.md) · [getPosASLVisual](../commands/getPosASLVisual.md) · [getPosATLVisual](../commands/getPosATLVisual.md) · [visiblePositionASL](../commands/visiblePositionASL.md) · [visiblePosition](../commands/visiblePosition.md) · [position](../commands/position.md) · [getPosATL](../commands/getPosATL.md) · [getPosASL](../commands/getPosASL.md) · [getPosASLW](../commands/getPosASLW.md)

## Community notes

**talkingtoaj** — 2016-03-03

[getPos](../commands/getPos.md) vs [getRelPos](../commands/getRelPos.md): [getRelPos](../commands/getRelPos.md) operates similarly to [getPos](../commands/getPos.md) except in [getRelPos](../commands/getRelPos.md) the direction is calculated 'relative' to the current object direction whereas [getPos](../commands/getPos.md)'s direction is from North. Thus while [getPos](../commands/getPos.md) can take a position array as it is starting point, [getRelPos](../commands/getRelPos.md) requires an object with its own azimut heading.

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