Smooth FPS camera

A forum to store posts deemed exceptionally wise and useful
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Captain_Kill wrote:If you check the docs for setFOV you'll see that you actually use fractions
To be more specific, it's radians that are used (1 degree = PI/180; 360 degrees = 2*PI). To set fov to e.g. 90 degrees you can do it like this:

Code: Select all

setFOV(90 * (f32)core::GRAD_PI2);
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

No problem bal :D

jox: Radians, fractions, whatever 8) It's all maths :)
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
timmy
Posts: 34
Joined: Wed Jul 14, 2004 2:48 am

Post by timmy »

wow great job warui ...just tried this fix just than and makes a very nice diff :D
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

Post by Asterisk Man »

FOV in Irrlicht uses radians (3.1415 = 180 degrees) so all you have to do to set a 90 degree FOV is camera->setFOV(3.1415f/2.0f);
Athlon_Jedi
Posts: 156
Joined: Wed Jul 21, 2004 4:29 am
Location: Mishawaka, In

use radians!!!

Post by Athlon_Jedi »

this is how i set my fov:

cam->setFOV(3.1415f/2.0);


its a radian expression and it works perfect! :wink:
Oz
Posts: 81
Joined: Tue Aug 31, 2004 3:34 pm

Post by Oz »

Code: Select all

//! Constant for PI.
const f32 PI				= 3.14159f;
You could put PI/2 if you wanted. I think 1.57 is probably right?
"When we looked at the relics of the precursors, we saw what heights civilization can attain.
When we looked at their ruins, we marked the danger of that height." -Keeper Annals
(Thief2: The Metal Age)
Oz
Posts: 81
Joined: Tue Aug 31, 2004 3:34 pm

Post by Oz »

Oh I mean for you. The default it PI/3.5 apparently. Whichever suits you.
"When we looked at the relics of the precursors, we saw what heights civilization can attain.
When we looked at their ruins, we marked the danger of that height." -Keeper Annals
(Thief2: The Metal Age)
SParkO

Post by SParkO »

Darklance wrote:That certainly sounds useful....can you provide a compiled dll/lib of this fix? I'm not sure how to compile them myself.
Yes, this would be very helpful to me as well.
muska
Posts: 5
Joined: Wed Sep 15, 2004 4:33 am

Post by muska »

Which functions cause the mouse to grab? And how can I stop the 360 degree rotation of the model, there seems to be a fixed point that it rotates around. I have just started with this engine so I am not completely familiar with the features.
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

:D
Last edited by TheRLG on Sat Mar 19, 2005 1:28 pm, edited 1 time in total.
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Re: how????

Post by bal »

RabidLockerGnome wrote:how do i change the dll? i dont have linux or anything like that.
There is a "source" directory in your Irrlicht SDK where you find the code for the complete engine. Open the project, edit the files and then compile, you should get a .dll-file and a .lib-file :).
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

thx
Last edited by TheRLG on Sat Mar 19, 2005 1:28 pm, edited 1 time in total.
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

ahh

Post by TheRLG »

8) this is so schweeeet awesome job!
Last edited by TheRLG on Sat Mar 19, 2005 1:29 pm, edited 1 time in total.
Guest

Post by Guest »

anyone can help with already compiled dll?
Guest

Post by Guest »

I was getting the same error, but then I added /jpeglib to the include path and also /zlib. Probably wrong, but I had no idea what else to do. At least now I'm getting linker errors.

Does anyone else have this problem? I'd really like to recompile the source with this camera fix in there.
Post Reply