   First person shooter mouse position woes
  Hey guys,I've started to write a rudimentary FPS framework and I've hit the first hurdle:I'm using FreeGLUT at the minute, which has a function called "glutPassiveMotionFunc(int, int)" which handles movement of the mouse, the only problem is that it's called continuously and so as soon as the application starts, it gets the mouse position and moves the camera in some unwanted direction (not forward)I've tried using glutWarpPointer to set the cursor position to halfway across the screen on the x and y axis- but this simply sets the x and y values in the mouse motion function to 400 and 300 instead of 0 and 0 which it should be if I was to keep the cursor centered on the screen.So in short; am I approaching this the wrong way, how do FPS creators normally keep track of the cursor position? (examples with GLUT would be greatly appreciated!)Thankyou for reading, Ollie.   
  It sounds like the first mouse data you read is incorrect but after that its ok.If this is the case, make a boolean called "bFirstFrame" and set it to true when the game starts up.Where you check your mouse position and handle it to do the camera movement, put something like this:if(bFirstFrame){  bFirstFrame=false;  //warp mouse position to center of the screen}else{  //handle mouse position changes  //warp mouse position to center of the screen}that will make it throw out the first mouse position is tossed out since it's invalid, and then after that you will get good data.HTH!   ;  Thankyou for your reply, I appreciate that.The problem was that as soon as the mouse moved to the left from the center of the screen, the xRotation property would be set to something crazy like 290 or something, which would instantly rotate the viewport to a crazy degree.I solved it by minusing half of the screen width and height from the x and y arguments each time the function was called!Sorted =DThanks for the suggestion man,Ollie.   ;  Oh ok.I misdiagnosed your problem but I'm glad you got it worked out (:   