Camera
@vimp-mp/types 2.0.1Scripted or gameplay camera exposed by the client runtime.
interface CameraMembers
direction
readonly direction: Vec3Direction vector derived from rotation using GTA camera rotation order 2.
fov
readonly fov: numberCurrent field of view in degrees.
handle
readonly handle: numberGTA camera handle. Gameplay camera exposes 0 because it has no script handle.
id
readonly id: numberClient-local camera identifier.
isActive
readonly isActive: booleanWhether the scripted camera is active.
isAlive
readonly isAlive: booleanWhether the camera can still be used.
isGameplay
readonly isGameplay: booleanWhether this wrapper represents the gameplay camera.
name
readonly name: stringGTA camera type name used at creation.
position
readonly position: Vec3Current world position.
rotation
readonly rotation: Vec3Current camera rotation in degrees.
destroy
destroy(): voidDestroys this camera instance.
pointAtCoord
pointAtCoord(position: Vec3): voidPoints the camera at a world coordinate.
setActive
setActive(active: boolean): voidActivates or deactivates this scripted camera.
setFov
setFov(fov: number): voidChanges the scripted camera's field of view in degrees.
setPosition
setPosition(position: Vec3): voidMoves the scripted camera to a world position.
setRotation
setRotation(rotation: Vec3): voidChanges the scripted camera's rotation in degrees.