SetCameraFieldOfView: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{client function}} 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...")
 
m (add vers)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{client function}}
{{client function}}
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.
{{New feature/item|3.0150|1.5|7284|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.}}
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 00:32, 10 June 2015

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.

Syntax

bool setCameraFieldOfView ( float fieldOfView )

OOP Syntax Help! I don't understand this!

Note: This is under the static class Camera
Method: Camera.setFieldOfView(...)
Variable: .fov
Counterpart: getCameraFieldOfView


Required Arguments

Note: after 100, some unexpected things may happen to the camera, particularly in vehicles, use carefully!

  • fieldOfView: The field of view angle, 0 to 179.

Returns

Returns true if the arguments are valid, false otherwise.

Example

In this example, the field of view is set to 20 when the player joins.

function setCameraFOVOnPlayerJoin()
    setCameraFieldOfView(20)
end
addEventHandler("onPlayerJoin", root, setCameraFOVOnPlayerJoin)

See Also