Jump to content
  • Advertisement

Archived

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

Zantac

Mouse filtering in directinput

This topic is 6591 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!