setCameraFieldOfView
Pair: getCameraFieldOfView
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function sets the field of view of the dynamic camera - this is the field of view of the non-fixed camera - yes, the camera that the user can control whilst on foot or in a vehicle. The higher the field of view angle, the more you will be able to see to your sides.
This function omits (but doesn't override) the user game option in Settings -> Video -> FOV
It doesn't affect the FOV for the following camera modes: 1) Player aiming 2) Vehicle front bumper camera 3) Fixed camera
Syntax
setCameraFieldOfView ( )Code Examples
In this example, the field of view for 'player walking/running' camera is set to 20, once resource fully starts.
local function changeCameraFovOnClientResourceStart() setCameraFieldOfView("player", 20)endaddEventHandler("onClientResourceStart", resourceRoot, changeCameraFovOnClientResourceStart)