@siread - camera fov
BlitzMax Forums/MiniB3D Module/@siread - camera fov
| ||
I was reading the new star games blog, and spotted your post about changing the cameras fov allowing for flatter angles. I've been going through the MiniB3D source and can't find where to change it. any clues? Cheers Charlie |
| ||
I think it's on TCamera.BMX, where you can see that the default value for the Zoom# field is 1.0, whenever you create a new camera. What happens is that FOV and Zoom values relate to each other through the following equation: Zoom# = 1.0/Tan(fov#/2.0)If you want a camera to use a certain FOV angle, all you need to do is input it into the Fov variable in this equation and you will get the appropriate Zoom value that corresponds to it. The default Zoom value of 1.0 for Blitz3D\MiniB3D results in a 90º degree FOV. |
| ||
Ah, cool! I'll give that a try :) Thanks a lot Cheers Charlie |
| ||
Excellent, works great :) Cheers Charlie |
| ||
You don't have to edit the source though. You can use the CameraZoom function...CameraZoom(camera, 1.0 / Tan(fov#/2.0)) Where 'camera' is of course your camera object. :) |
| ||
Yeah, i worked it out :) Cheers Charlie |