SetCamFarDof
DocsSetCamFarDof(cam, farDOF)Description
Specifies when the camera should stop being in focus. Can be used together with <code>SET_USE_HI_DOF</code>, <code>SET_CAM_NEAR_DOF</code>, <code>SET_CAM_USE_SHALLOW_DOF_MODE</code>, <code>SET_CAM_DOF_STRENGTH</code> and other DoF related natives.
### Usage Example
A usage example for this native can be found in the following native documentation: <code>SET_CAM_DOF_STRENGTH</code>.
Parameters
| Name | Type | Description |
|---|---|---|
cam | Cam | The camera handle |
farDOF | float | Distance in in standard units |
Quick Snippet: Scripted Cameracam
camUse 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.