   Right way to use mouse motion for cam movement
  I''m looking for the right way to move the camera with the mouse. My approaches always create jerky, messed up movement.Here''s the SDL version of my code:   case SDL_MOUSEMOTION:{if( E.motion.x != 500 || E.motion.y != 500 ){myPlayer->MoveByMouse( 500-E.motion.x, 500-E.motion.y );SDL_WarpMouse(500,500);}// end if}break;I think these lines are quite self-explaining. But I''d like to know what the *real* way of doing this looks like...(Or am I doing something wrong?)Thanks!!!!!!!!!!!!! 
  I would start by seperating the mouse control from the camera / player.The input device (mouse) would give the system the user's intentions and then a controller would take that and apply the results to camera or player.For example the player indicates a direction or position for the camera to move in, the controller takes that and smoothly moves in the indicated direction via acceleration and de-acceleration. This gives you the non-jerky feel your currently getting.One issue to be aware of is with this seperation you can potentally get a lag effect where the player indicates a direction and it takes too long for the camera to respond. This is usually solved by making such values as acceleration and de-acceleration, maximum speed, etc quite large. In the end it's going to be a balancing issue, responsiveness vs smoothness. 8o)Michael   [edited by - MIchaelCarr on July 31, 2003 9:44:58 AM]