| Property | Value |
|---|---|
| Native Name | RENDER_SCRIPT_CAMS |
| Hash | 0x07E5B515DB0636FC |
| Return Type | void |
| Parameters | render (BOOL), ease (BOOL), easeTime (int), easeCoordsAnim (BOOL), p4 (BOOL) |
Description: Renders the camera previously created with CREATE_CAM or CREATE_CAMERA
NativeDB Added Parameter 6: Any p5
Parameters
render(BOOL) — Whether to render the cams or not.ease(BOOL) — If true it will make a smooth transition between the current camera and the new rendered camera.easeTime(int) — The in milliseconds for the transition to happen.easeCoordsAnim(BOOL) — If false it will only do the smooth transition to the rotation and the coords will be set instantly.p4(BOOL) — Doesn't seem to change anything.
Examples
local casino = vector3(881.31, 74.71, 94.43)
-- Create the camera that will be used for RenderScriptCams
local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)
-- Set the camera coordinates to be in front of the Casino
SetCamCoord(cam, casino.x, casino.y, casino.z)
-- Rotate the camera towards the casino
SetCamRot(cam, -25.0, 0.0, -124.22)
-- Render the camera and so a smooth transition for 2000ms
RenderScriptCams(true, true, 2000, false, true)
-- tell the game to load maps, collisions, objects, etc around the casino.
SetFocusPosAndVel(casino.x, casino.y, casino.z, 0.0, 0.0, 0.0)
-- We wait 5 seconds + 2 extra for the transition
Wait(7000)
-- Remove the cam, we no longer need it
DestroyCam(cam)
-- reset streaming focus to be at the local player ped
ClearFocus()
-- Stop rendering the script camera and interpolate back to their player ped
RenderScriptCams(false, true, 2000, false, false)