Code archives/3D Graphics - Misc/Set Camera FOV

This code has been declared by its author to be Public Domain code.

Download source code

Set Camera FOV by sswift2003
This simple function sets the horizontal FOV of the specified camera.

Now you can set your camera to have an FOV of exactly 90 degrees for rendering cubic environment maps. Yay!
Function SetCameraFOV(Camera, FOV#)
   CameraZoom Camera, 1.0 / Tan(FOV#/2.0)
End Function

Comments

RexRhino2008
Just in case anyone is looking through the code source looking for a function to generate sky boxes from 3D scenes created in Blitz3D, this is what you would use.


Code Archives Forum