Cam::setDofParam

From RAGE Multiplayer Wiki
Revision as of 18:06, 25 December 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| === Summary === Sets a specific Depth of Field (DOF) parameter for a specified camera. === Syntax === <syntaxhighlight lang="javascript"> mp.game.cam.setDofParam(cameraHandle, paramHash, value); </syntaxhighlight> === Required Parameters === * '''cameraHandle:''' {{RageType|number}} - The handle of the camera. * '''paramHash:''' {{RageType|number}} - The hash of the DOF parameter to set. * '''value:''' {{RageType|bool|number|Arr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Sets a specific Depth of Field (DOF) parameter for a specified camera.

Syntax

mp.game.cam.setDofParam(cameraHandle, paramHash, value);

Required Parameters

  • cameraHandle: number - The handle of the camera.
  • paramHash: number - The hash of the DOF parameter to set.
  • value: bool - The value to assign to the parameter.

Return Value

  • undefined

Example

// Set a DOF parameter for a specific camera
const cameraHandle = mp.cameras.new("default").handle;
const dofParamHash = mp.game.joaat("dof_blur_amount");
const newValue = 1.0;

mp.game.cam.setDofParam(cameraHandle, dofParamHash, newValue);
mp.gui.chat.push("Camera DOF blur amount updated.");


See Also