May 25, 2020, 09:26:41 AM

Author Topic: [bb] Set Camera FOV by sswift [ 1+ years ago ]  (Read 985 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Set Camera FOV by sswift [ 1+ years ago ]
« on: June 29, 2017, 12:28:39 AM »
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
  1. Function SetCameraFOV(Camera, FOV#)
  2.    CameraZoom Camera, 1.0 / Tan(FOV#/2.0)
  3. 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.


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal