SetCameraFov
(Difference between revisions)
(Created page with "Change the camera field of view. Example, Press Up & Down to change the Camera Field of view : Camera = getObject("Camera") -- Scene update function onSceneUpda...") |
Dahnielson (Talk | contribs) |
||
| Line 10: | Line 10: | ||
if isKeyPressed("UP") then setCameraFov(Camera, cFOV-0.5) end | if isKeyPressed("UP") then setCameraFov(Camera, cFOV-0.5) end | ||
end | end | ||
| + | |||
| + | [[Category:Lua scripting]] | ||
Revision as of 18:11, 4 February 2014
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