SixL client API / cameras / GameplayCameraMp

Interface: GameplayCameraMp

The gameplay camera as mp.cameras.gameplay gives it: where the player's camera is, as the latest frame has it.

Remarks

SixL only: read only, so it has the getters of CameraMp and no setters.

Example

const fov = mp.cameras.gameplay.getFov();

Properties

handle

readonly handle: number

Always 0: the gameplay camera has no game handle of its own.

Example

const handle = mp.cameras.gameplay.handle;

type

readonly type: string

Always 'camera'.

Example

if (cam.type === 'camera') { }

Methods

doesExist()

doesExist(): boolean

Always true: the gameplay camera always exists.

Returns

boolean

true.

Example

if (mp.cameras.gameplay.doesExist()) { }

getCoord()

getCoord(): Vector3

The gameplay camera's position, as the latest frame has it.

Returns

Vector3

The position in metres.

Example

const pos = mp.cameras.gameplay.getCoord();

getFov()

getFov(): number

The gameplay camera's vertical field of view, as the latest frame has it.

Returns

number

The field of view in degrees.

Example

const fov = mp.cameras.gameplay.getFov();

getRot()

getRot(rotationOrder?): Vector3

The gameplay camera's rotation, as the latest frame has it.

Parameters

rotationOrder?

number

Accepted for RAGE MP compatibility; ignored.

Returns

Vector3

The rotation in degrees: x the pitch (positive looks up), y the roll, z the yaw.

Example

const rot = mp.cameras.gameplay.getRot(2);