_INTERPOLATE_CAM_WITH_PARAMS
DocsInterpolateCamWithParams(camera, camPosX, camPosY, camPosZ, camRotX, camRotY, camRotZ, fov, duration, posCurveType, rotCurveType, rotOrder, fovCurveType)Description
Introduced in build 3258
Interpolates the camera to specified parameters over a set duration using various curve types for position, rotation, and fov.
Parameters
| Name | Type | Description |
|---|---|---|
camera | Cam | — |
camPosX | float | — |
camPosY | float | — |
camPosZ | float | — |
camRotX | float | — |
camRotY | float | — |
camRotZ | float | — |
fov | float | — |
duration | int | — |
posCurveType | int | — |
rotCurveType | int | — |
rotOrder | int | — |
fovCurveType | int | — |
Quick Snippet: Scripted Cameracamera
cameraUse this to create and control a scripted camera for this native.
-- Create a scripted camera at the player's position
local coords = GetEntityCoords(PlayerPedId())
local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)
SetCamCoord(cam, coords.x, coords.y, coords.z + 2.0)
SetCamRot(cam, -15.0, 0.0, GetEntityHeading(PlayerPedId()))
SetCamFov(cam, 70.0)
SetCamActive(cam, true)
RenderScriptCams(true, true, 500, true, true)
-- Restore gameplay camera:
-- RenderScriptCams(false, true, 500, true, true)
-- DestroyCam(cam, true)Returns
voidThis native does not return a value.