FPS Camera - Warped?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Darklance
Posts: 5
Joined: Mon Jul 12, 2004 4:54 am

FPS Camera - Warped?

Post by Darklance »

I'm sure many of you have noticed this, but the default Irrlicht FPS camera is really warped.

I think this has something to do with the FOV, but I'm not sure how to change it....I've read the (confusing) documentation, and it refers to a "setFOV" function, but I can't figure out how to use it.

Since I'm fairly new to graphics programming and haven't touched C++ in a long time, I figured it would be best to ask here.

Little help?
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

The documentation I can assure you is quite good for Irrlicht. If you do not believe me take a look at source for several other open source projects.
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

For the most part it is good, yes, although there are a few typo's and things that aren't totally clear. This could be one of them ( although doing a search in the forums would easily have helped you ).

It is measured in degrees, which the docu doesn't say, as well as AFAIK it being set to 45 degrees by default ( I am pretty sure this is correct, I don't know why it says it defaults to PI/3.5f although someone else might know ). Try setting it to 90 degrees to lessen the fish eye effect.
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Tyn wrote:Try setting it to 90 degrees to lessen the fish eye effect.
I did and indeed, now the camera behaves like a "real" FPS camera. But it's just like it is zoomed in.

http://irrlicht.sourceforge.net/phpBB2/ ... ght=camera for pictures ...
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Lonewolf

Post by Lonewolf »

Try 60. That should be about right.
Setting it higher creates that zoom effect which is exactly what you would want for a sniper rifle or binoculars :wink:
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Hmm, I use a top down camera so I've never really noticed that zoom effect. Good to know :)
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Weird, if I use 60 or 80 or maybe others too, the view is rotated, scaled and the mousemovements are odd (left = right and vice versa, up = under and vice versa).
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Darklance
Posts: 5
Joined: Mon Jul 12, 2004 4:54 am

Post by Darklance »

OK, solved the problem....it was easy, as you guys pointed out. Thanks!

For some reason, it appears that a FOV of 90 in software windowed mode has a strange "zoom" effect, as mentioned, but FOV 90 in DirectX 8 fullscreen mode works just fine.
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

bal wrote:Weird, if I use 60 or 80 or maybe others too, the view is rotated, scaled and the mousemovements are odd (left = right and vice versa, up = under and vice versa).
That would lead me to believe the field of view is behind the camera so the camera is rotated the oppoiste direction. I would imagine it thinks it is pointing the correct direction so moving left would appear to be moving right exc.

Who knows but that is what it sounds like to me. Bug maybe? :?:
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

Post by Asterisk Man »

The FOV uses radians, so PI/3.5 should be equal to +/- = 51 degrees

If you want 90 degrees in you FOV, simply use PI/2. (3.1415f/2.0f)
Post Reply