GetCameraFieldOfView: Difference between revisions
Jump to navigation
Jump to search
m (Fixed template at →See Also) |
m (Update for new version) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{client function}} | {{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]].}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
float getCameraFieldOfView () | float getCameraFieldOfView (string cameraMode) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP|This is under the static class '''Camera'''|Camera.getFieldOfView|fov|setCameraFieldOfView}} | {{OOP|This is under the static class '''Camera'''|Camera.getFieldOfView|fov|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=== |
Revision as of 00:39, 7 August 2015
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!
- Note: This is under the static class Camera
- 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 is: " .. getCameraFieldOfView()) end addCommandHandler("getfov", getCamFOV)
See Also
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraViewMode
- Shared
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget