CameraManager
@vimp-mp/types 2.0.1Creates scripted cameras and exposes the gameplay camera.
ts
interface CameraManagerMembers
all
ts
readonly all: Array<Camera>Script cameras created via create; does not include the gameplay camera.
count
ts
readonly count: numberNumber of active scripted cameras.
create
ts
create(name: string, position: Vec3, rotation: Vec3, fov: number): CameraCreates a scripted camera with the supplied transform and field of view.
getById
ts
getById(id: number): Camera | nullReturns the scripted camera with id, or null when it does not exist.
getGameplayCamera
ts
getGameplayCamera(): CameraReturns the singleton wrapper for GTA's gameplay camera.
renderScriptCams
ts
renderScriptCams(render: boolean, ease?: boolean, easeTime?: number, freezePreviousCamera?: boolean): voidEnables or disables rendering through scripted cameras.