View Full Version : head follows mouse movement like quake?

05-21-2002, 10:35 PM
is there any refeernce site or tutorials that details how to make the "head view" follows the mouse movement like in quake or other similiar games?


05-22-2002, 12:19 AM
Just measure how long the mousepointer has moved since last frame and use that as rotation value (addative).

05-22-2002, 01:02 AM
in quake3(probably in other too) they interpolate mouse movement between present and previous frame, so it looks a bit smoother (but this way you loose some accuracy)....
and of course mouse movement is somehow scaled by frametime..

05-22-2002, 02:17 AM
First I also thought you'd need to scale the mouse movement by the frametime, but it turned out it wasn't so!.. Or atleast it looked wrong to me when I did.

If you think about it, if a frame takes longer to draw, the user can move the mouse longer before the program measure it... It becomes "naturally" multiplied http://www.opengl.org/discussion_boards/ubb/smile.gif

05-22-2002, 02:34 AM
yes, that's true...
for example when frametime == 1sec, you'll see what you should see past second http://www.opengl.org/discussion_boards/ubb/smile.gif
but actually there's no way to avoid it - what makes it unnoticable in games is high fps, otherwise it's a pain anyway