Camera::setFov: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
let camera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40); // Creates the camera
camera.setActive(true);
 
camera.setFov(15); // Sets the Field of View of the camera to 15
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Camera_function_c}}
{{Camera_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 23:20, 11 December 2020

Sets the field of view of the camera.
---------------------------------------------
Min: 1.0f
Max: 130.0f

Syntax

camera.setFov(fieldOfView);

Required Arguments

  • fieldOfView: float

Return value

  • Undefined

Example

let camera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40); // Creates the camera
camera.setActive(true);

camera.setFov(15); // Sets the Field of View of the camera to 15

See also