HU/getCameraFieldOfView: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{client function}} {{New feature/item|3.0151|1.5.1|7397|This function returns the field of view of the ''dynamic camera'' as set by setCameraFieldOfView.}} ==Sy...")
 
 
(3 intermediate revisions by the same user not shown)
Line 14: Line 14:
** "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")
** "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===
===Visszatérési érték===
Returns one float - the field of view angle
Visszatérési értéke egy float - a látómező szöge


==Example==
==Example==
In this example, the field of view is output to the chat whenever the /getfov command is written
Ebben a példában kiírja a chatba a látómezőt, amikor a /getfov parancsot beírják


<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 26: Line 26:
addCommandHandler("getfov", getCamFOV)</syntaxhighlight>
addCommandHandler("getfov", getCamFOV)</syntaxhighlight>


==See Also==
==Lásd még==
{{Client camera functions}}
{{Client camera functions hu}}


[[en:getCameraFieldOfView]]
[[en:getCameraFieldOfView]]
==Fordította==
* '''''Surge'''''

Latest revision as of 14:55, 13 August 2018

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")

Visszatérési érték

Visszatérési értéke egy float - a látómező szöge

Example

Ebben a példában kiírja a chatba a látómezőt, amikor a /getfov parancsot beírják

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

Lásd még

Fordította

  • Surge