---
name: "BIS_fnc_vectorDirAndUpRelative"
type: function
status: ok
groups: ["Vectors"]
arma3_since: "1.64"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_vectorDirAndUpRelative
revid: 325129
updated: 2022-07-01T12:35:35Z
---

# BIS_fnc_vectorDirAndUpRelative

*Function · Vectors · Arma 3 v1.64*

## Description

Returns [vectorDirAndUp](../commands/setVectorDirAndUp.md) of object 1 relative to object 2

## Syntax

```sqf
[object1, object2, visual] call BIS_fnc_vectorDirAndUpRelative
```

**Parameters:**

- `object1`: [Object](../topics/Object.md)
- `object2`: [Object](../topics/Object.md)
- `visual`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) [true](../commands/true.md) for a render scope result, [false](../commands/false.md) for simulation scope

**Returns:** [Array](../topics/Array.md) in format [[vectorDir](../commands/vectorDir.md), [vectorUp](../commands/vectorUp.md)]

## Examples

### Example 1

```sqf
private _vectorDirAndUp = [tank, car] call BIS_fnc_vectorDirAndUpRelative;
```

## See also

[BIS_fnc_attachToRelative](../functions/BIS_fnc_attachToRelative.md) · [BIS_fnc_weaponDirectionRelative](../functions/BIS_fnc_weaponDirectionRelative.md) · [vectorDir](../commands/vectorDir.md) · [vectorUp](../commands/vectorUp.md) · [setVectorDirAndUp](../commands/setVectorDirAndUp.md)

<sub>Source: [BI Community Wiki — BIS fnc vectorDirAndUpRelative](https://community.bistudio.com/wiki/BIS_fnc_vectorDirAndUpRelative) (revision 325129).</sub>
