Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Using FOV to make a scope for FPS game.

Author
Message
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 15th Sep 2010 18:05
Hello again!
I've stumbled across using the FOV functions to make a zoom effect and have read some threads on the subject on these forums so the actual implementation of the function is all right.

However, I'd like to know if it's possible to get an exact zoom amount using these functions, eg. Can I make a zoom scope which is exactly 2X? How would I go about calculating the FOV for a particular zoom level?

Thanks,
Broken_Code
bergice
19
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 15th Sep 2010 20:27
The default FOV is:



So to zoom x2 you simply do:



9cdfb439c7876e703e307864c9167a15
Broken_Code
15
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 16th Sep 2010 00:19
Is it really that easy? I tried that and it didn't look like 2X zoom, must be my eyes! Thanks for the reply, sorry about the trivial question.

Thanks,
Broken_Code
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 16th Sep 2010 04:00
The FOV is an angle, so yes, I believe that's it.


Latest progress: Fog of War implemented; frustrated by pathfinding >.>
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 16th Sep 2010 18:22
I tried the FOV command, it seems to be offset a little, but that might just be me. You could just move the camera closer?

Login to post a reply

Server time is: 2026-07-22 12:41:14
Your offset time is: 2026-07-22 12:41:14