Camera::setDofParam

From RAGE Multiplayer Wiki
Revision as of 18:07, 25 December 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| === Summary === Sets a specific Depth of Field (DOF) parameter for the active camera. === Syntax === <syntaxhighlight lang="javascript"> camera.setDofParam(paramHash, value); </syntaxhighlight> === Required Parameters === * '''paramHash:''' {{RageType|number}} - The hash of the DOF parameter to set. * '''value:''' {{RageType|bool|number|Array<number>}} - The value to assign to the parameter. === Return Value === * '''undefined'...")
(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 the active camera.

Syntax

camera.setDofParam(paramHash, value);

Required Parameters

  • 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 value
const dofParamHash = mp.game.joaat("dof_blur_amount");
const newValue = 0.8;

camera.setDofParam(dofParamHash, newValue);
mp.gui.chat.push("DOF blur amount updated.");


See Also