Knowledge from the fieldRedM

RDR3 script-cam activation: CreateCam preset STRING + SetCamActive + RenderScriptCams; use SetCamActiveWithInterp when a cam already renders

learning:61

RDR3 script-cam activation: CreateCam preset STRING + SetCamActive + RenderScriptCams; use SetCamActiveWithInterp when a cam already renders

Context

A camera created with CreateCam/CreateCamWithParams renders nothing until activated. Agents forget the activation step and get a frozen/black view.

The two-branch rule

local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)   -- 0xE72CDBA7F0A02DD6; arg is a STRING preset, not a hash
SetCamCoord(cam, ...) ; SetCamRot(cam, ...)
if noPriorScriptCam then
  SetCamActive(cam, true)
  RenderScriptCams(true, true, interpMs, true, true)     -- 0x33281167E4942E4F
else
  SetCamActiveWithInterp(cam, currentCam, interpMs)      -- 0x8B15AE2987C1AC8F ; do NOT also call RenderScriptCams
end

Teardown mirrors this: RenderScriptCams(false, ...) only when returning to the gameplay camera, then SetCamActive(cam,false)DestroyCam(cam, true) → set handle to nil/-1.

Traps

  • CreateCam's first arg is the preset string "DEFAULT_SCRIPTED_CAMERA", not a hash.
  • If a script cam is already rendering, switch with SetCamActiveWithInterp (interpolated) and do not re-call RenderScriptCams.
  • GetRenderingCam() returns -1 when the gameplay cam is active — jo treats -1 as "no cam" everywhere.

Verified

camera/client.lua:79-80,190-201; gizmo/client.lua:145-182.

Linked natives

  • CREATE_CAM (0xE72CDBA7F0A02DD6)
  • RENDER_SCRIPT_CAMS (0x33281167E4942E4F)
  • SET_CAM_ACTIVE_WITH_INTERP (0x8B15AE2987C1AC8F)

Tags: cam, renderscriptcams, createcam, interp, ordering, rdr3
Category: natives
Source: jo_libs-fleet
Created: 2026-05-31T09:41:37.351Z

Back to documentation