[**SixL server API**](../../README.md)

***

[SixL server API](../../README.md) / [common](../README.md) / Vector3Constructor

# Interface: Vector3Constructor

The constructor `mp.Vector3`.

## Constructors

### Constructor

> **new Vector3Constructor**(`x?`, `y?`, `z?`): [`Vector3`](Vector3.md)

Creates a vector.

#### Parameters

##### x?

`number`

East-west, metres (default 0).

##### y?

`number`

North-south, metres (default 0).

##### z?

`number`

Height, metres (default 0).

#### Returns

[`Vector3`](Vector3.md)

#### Example

```ts
const pos = new mp.Vector3(100, 200, 30);
```

### Constructor

> **new Vector3Constructor**(`components`): [`Vector3`](Vector3.md)

Creates a vector from `[x, y, z]`.

#### Parameters

##### components

`number`[]

The three components (a missing one is 0).

#### Returns

[`Vector3`](Vector3.md)

#### Example

```ts
const pos = new mp.Vector3([100, 200, 30]);
```

### Constructor

> **new Vector3Constructor**(`components`): [`Vector3`](Vector3.md)

Creates a vector from anything with `x`, `y`, `z` (a missing one is 0).

#### Parameters

##### components

[`IVector3`](IVector3.md)

A plain object or another vector.

#### Returns

[`Vector3`](Vector3.md)

#### Example

```ts
const pos = new mp.Vector3({ x: 100, y: 200, z: 30 });
```
