GetCameraFieldOfView: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Deleted default values, they are independent from server)
Tag: Manual revert
 
(6 intermediate revisions by 4 users not shown)
Line 6: Line 6:
float getCameraFieldOfView ( string cameraMode )
float getCameraFieldOfView ( string cameraMode )
</syntaxhighlight>
</syntaxhighlight>
{{OOP|This is under the static class '''Camera'''|Camera.getFieldOfView|fov|setCameraFieldOfView}}
{{OOP||Camera.getFieldOfView|fov|setCameraFieldOfView}}


===Required Arguments===
===Required Arguments===
Line 28: Line 28:
==See Also==
==See Also==
{{Client camera functions}}
{{Client camera functions}}
[[hu:getCameraFieldOfView]]
[[RO:getCameraFieldOfView]]

Latest revision as of 19:41, 14 January 2022

This function returns the field of view of the dynamic camera as set by setCameraFieldOfView.

Syntax

float getCameraFieldOfView ( string cameraMode )

OOP Syntax Help! I don't understand this!

Method: Camera.getFieldOfView(...)
Variable: .fov
Counterpart: setCameraFieldOfView


Required Arguments

  • cameraMode: the camera mode to get the field of view of
    • "player": whilst walking/running
    • "vehicle": whilst in vehicle
    • "vehicle_max": the max the field of view can go to when the vehicle is moving at a high speed (must be higher than "vehicle")

Returns

Returns one float - the field of view angle

Example

In this example, the field of view is output to the chat whenever the /getfov command is written

function getCamFOV()
    outputChatBox("The camera field of view for 'player walking/running' is: " .. getCameraFieldOfView("player"))
end
addCommandHandler("getfov", getCamFOV)

See Also