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 Discussion / How do you make the camera zoom in and out?

Author
Message
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 4th Jun 2004 19:56
I need help making the camera zoom in and out like for a sniper rifle or something

Can you help?
David Brand
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 4th Jun 2004 20:01
use FOV m8

http://www.nuclearglory.com/?i=607436221, *Nuclearglory is a must for ALL DBC, and DBP games!*, click thr link to visit the website
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 4th Jun 2004 20:25
In a little more detail...



By adjusting the FOV value (from 90 down to 0 IIRC) you can acheive a "zoom in" effect. You don't need to move the camera.

"Normal" viewing is 90 fov.

I'll put together an example

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 4th Jun 2004 20:47
Thanks!

I'm not using DbPro, but I think it'll still work

I try it when I get home
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 4th Jun 2004 21:19 Edited at: 4th Jun 2004 21:19
Here you go:



*Should* be no problem without Pro - there are no special commands there.

Quite pleased with that demo actually

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 8th Jun 2004 18:27
Thanks!

I'll add that to my Fps game
bibz1st
22
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 9th Jun 2004 22:04
try this code

rob
Night Giant
21
Years of Service
User Offline
Joined: 26th Jul 2003
Location:
Posted: 11th Jun 2004 08:49
just remember that the angle is specified in radians, not degrees. i think, lol.

oh, wow. insignificantpunks.cjb.net.
no: website for progs yet.
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Jun 2004 13:58
Yeah, the angle is radian messure. Not Degree's.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 11th Jun 2004 19:13
Thanks!

and the code works good

Luckly I know how to convert radins and degrees because of math class

I was wondering what the camera's fov is originally and why it messes up if you put the number too low or too low

Login to post a reply

Server time is: 2025-05-26 05:30:32
Your offset time is: 2025-05-26 05:30:32