Archived

This topic is now archived and is closed to further replies.

Mouse filtering in directinput

This topic is 6346 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Does anyone know how to do mouse filtering with directinput? What i mean is that the mouse is sampled like 20 times / sec, and if you use the mouse to turn the camera in a game, the game updates at 20 fps no matter how fast the game goes. I''ve seen other games smooth the mouse movement so that it updates with the game''s fps, but have no clue how to do it... help! =)

Share this post


Link to post
Share on other sites
I''ve never messed around with mouse input myself, but just off the top of my head, you could try doing something like mousePos += mouseIncrement / (fps / mouseFps, where mouseIncrement is the distance the mouse has moved since the last update, and mouseFps is the mouse updates per second, which would be 20 according to your post. Not sure if that''d work, but it might.

Share this post


Link to post
Share on other sites