SetCameraFov

(Difference between revisions)
Jump to: navigation, search
Line 12: Line 12:
  
 
[[Category:Lua scripting]]
 
[[Category:Lua scripting]]
 +
[[Category:Lua function]]
 +
[[Category:Camera]]

Revision as of 19:41, 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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox