Mousecursor dependent rotations


I’m working on the player controls for a first person view program. i use the mouse to set the view angles, i.e. look up/down if mouse moves up/down, look left/right if mouse moves left/right…BUT:
some nasty flickering occurs when i rotate around…i’ve implemented all the stuff in the motion function (btw: i use the glut).

any ideas ? thanks a lot,

Are you using a double buffered display?


yes, i use double buffering…and the polygon count is quite small (less than 200 polys).
that nasty effect occurs only, when i rotate the scene
via the mouse, because the inc/decrementation step
for the angles is 2.5 units…suppose that i make
a very small move with the mouse (say, about 2-3 pixels), then the scene rotates of course about 2.5 degrees, which produces that effect…
sure, i can reduce that 2.5 units to some smaller value, but then i have to move the mouse quite long…

frankly said, i just want to create such smooth player controls as for example, quake has them…


ok, i’ve solved the problem

i took a look into the quake sources and replaced the
glut with basic xlib calls (i had to grad the mouse pointer, disable the mouse events, calculated the coordinates, and reenabled the events).

i think that the glut is not very good for realtime apps (like games).


Walantis, I need to do what you did. Could you let me see some code or direct me to the quake source.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.