SyntaxBomb - Indie Coders

Languages & Coding => Blitz Code Archives => 3D Graphics - Misc => Topic started by: BlitzBot on June 29, 2017, 00:28:39

Title: [bb] Set Camera FOV by sswift [ 1+ years ago ]
Post by: BlitzBot on June 29, 2017, 00:28:39
Title : Set Camera FOV
Author : sswift
Posted : 1+ years ago

Description : 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!


Code :
Code (blitzbasic) Select
Function SetCameraFOV(Camera, FOV#)
   CameraZoom Camera, 1.0 / Tan(FOV#/2.0)
End Function


Comments :


RexRhino(Posted 1+ years ago)

 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.