SetCameraFov
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
| Line 1: | Line 1: | ||
| + | {{lua-function|setCameraFov|object, fov}} | ||
| + | |||
Change the camera field of view. | Change the camera field of view. | ||
Revision as of 17:17, 8 February 2014
setCameraFov(object, fov)
Change the camera field of view.
Example, Press Up & Down to change the Camera Field of view :
Camera = getObject("Camera")
-- Scene update
function onSceneUpdate()
cFOV = getCameraFov(Camera)
if isKeyPressed("DOWN") then setCameraFov(Camera, cFOV+0.5) end
if isKeyPressed("UP") then setCameraFov(Camera, cFOV-0.5) end
end