A forum to store posts deemed exceptionally wise and useful
oconv
Posts: 14 Joined: Fri Dec 17, 2004 2:12 pm
Post
by oconv » Tue Jan 04, 2005 10:49 pm
yeah, much smoother
thanks alot
Guest
Post
by Guest » Thu Feb 17, 2005 7:55 pm
isn't
Code: Select all
if (cursorpos.X < 0.5f || cursorpos.X > 0.5f ||
cursorpos.Y < 0.5f || cursorpos.Y > 0.5f)
the same as
Code: Select all
if (cursorpos.X != 0.5f || cursorpos.Y != 0.5f)
if so, and I'm not completly dumb, why not use the other option?
Guest
Post
by Guest » Fri Feb 18, 2005 5:33 pm
why dont u just test out ur option and let us know of any differnece
StickyBit
Posts: 94 Joined: Mon Jul 05, 2004 3:40 am
Location: Sønderup, Denmark
Contact:
Post
by StickyBit » Sun Feb 27, 2005 12:00 am
FYI: I´ve just used Warui´s hack on ver. 0.8 - and it still does magic.
Regards Stickybit
afecelis
Admin
Posts: 3075 Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:
Post
by afecelis » Sun Feb 27, 2005 1:39 am
it sure does, dunno why it hasn't been made official.
Guest
Post
by Guest » Tue Mar 01, 2005 5:49 am
Anonymous wrote: isn't
Code: Select all
if (cursorpos.X < 0.5f || cursorpos.X > 0.5f ||
cursorpos.Y < 0.5f || cursorpos.Y > 0.5f)
the same as
Code: Select all
if (cursorpos.X != 0.5f || cursorpos.Y != 0.5f)
if so, and I'm not completly dumb, why not use the other option?
Yes, I saw the same thing. That would be a better way of checking cursorpos.
Wintran
Posts: 2 Joined: Sun Mar 13, 2005 9:49 pm
Location: Sweden
Post
by Wintran » Sun Mar 13, 2005 10:02 pm
You can use this code to set the fov using degrees instead of radians:
Code: Select all
3.14159f / (180f / (180 - degrees))
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.
yes
Post
by yes » Sat Mar 19, 2005 5:46 am
sounds like it is using radians instead of degrees. radians are fractions of pi.
1.4 rads is very close to 90 degrees.
Myth
Posts: 81 Joined: Wed Apr 13, 2005 5:48 pm
Post
by Myth » Mon Aug 15, 2005 12:11 pm
In case anyone doesn't understand how to use it... use this funtion.
Thanks to wintran.
Code: Select all
// Myth
void setFOVdegrees(ISceneNode *cam, const float degrees)
{
cam->setFOV(3.14159f / ( 180.0f / (180 - degrees)));
return;
}
Myth
Posts: 81 Joined: Wed Apr 13, 2005 5:48 pm
Post
by Myth » Mon Aug 15, 2005 8:29 pm
It gives sqrt: DOMAIN EXPECTION ERROR at runtime.
Any idea why?