Page 1 of 1

FPS Camera - Warped?

Posted: Mon Jul 12, 2004 4:57 am
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?

Posted: Mon Jul 12, 2004 5:12 am
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.

Posted: Mon Jul 12, 2004 11:33 am
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.

Posted: Mon Jul 12, 2004 12:24 pm
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 ...

Posted: Mon Jul 12, 2004 1:22 pm
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:

Posted: Mon Jul 12, 2004 3:17 pm
by Tyn
Hmm, I use a top down camera so I've never really noticed that zoom effect. Good to know :)

Posted: Mon Jul 12, 2004 7:58 pm
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).

Posted: Tue Jul 13, 2004 2:05 am
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.

Posted: Tue Jul 13, 2004 2:17 am
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? :?:

Posted: Wed Jul 14, 2004 6:33 pm
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)