fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Client / World / createCamera

Function: createCamera()

createCamera(position, rotation, fieldOfView): Camera

Creates a camera using ‘DEFAULT_SCRIPTED_CAMERA’.

Parameters

position: Vector3

World coordinate where the camera should render.

rotation: Vector3

Rotation of camera relative to world.

fieldOfView: number

Field of view angle of camera.

Returns

Camera

Camera object.

Example

const position = new Vector3(-802.311, 175.056, 72.8446);
const myCamera = World.createCamera(position, new Vector3(0,0,0), 180);

Defined in

client/World.ts:292