thanks alot
Smooth FPS camera
-
Guest
isn't
the same as
if so, and I'm not completly dumb, why not use the other option?
Code: Select all
if (cursorpos.X < 0.5f || cursorpos.X > 0.5f ||
cursorpos.Y < 0.5f || cursorpos.Y > 0.5f)
Code: Select all
if (cursorpos.X != 0.5f || cursorpos.Y != 0.5f)
-
Guest
Yes, I saw the same thing. That would be a better way of checking cursorpos.Anonymous wrote:isn'tthe same asCode: Select all
if (cursorpos.X < 0.5f || cursorpos.X > 0.5f || cursorpos.Y < 0.5f || cursorpos.Y > 0.5f)if so, and I'm not completly dumb, why not use the other option?Code: Select all
if (cursorpos.X != 0.5f || cursorpos.Y != 0.5f)
You can use this code to set the fov using degrees instead of radians:
Simply replace "degrees" with the desired number of degrees (1-180) that you want your fov to be.
Regarding the smooth mouse code, I would also love to see this or a similar code being implemented to the official game engine. It is a requirement for any serious 3D app using the mouse for camera movements.
Code: Select all
3.14159f / (180f / (180 - degrees))Regarding the smooth mouse code, I would also love to see this or a similar code being implemented to the official game engine. It is a requirement for any serious 3D app using the mouse for camera movements.
-
yes
In case anyone doesn't understand how to use it... use this funtion.
Thanks to wintran.
Thanks to wintran.
Code: Select all
// Myth
void setFOVdegrees(ISceneNode *cam, const float degrees)
{
cam->setFOV(3.14159f / ( 180.0f / (180 - degrees)));
return;
}
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.
My fan site: http://www.halo-center.com
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.
My fan site: http://www.halo-center.com
It gives sqrt: DOMAIN EXPECTION ERROR at runtime.
Any idea why?
Any idea why?
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.
My fan site: http://www.halo-center.com
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.
My fan site: http://www.halo-center.com