Jump to content
  • Advertisement

Archived

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

superpig

[DirectInput] Mouse values never zero

This topic is 5293 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

I''ve got a little problem with relative mouse data. The values I''m getting for up/down and left/right axis are never zero, even if I let go of the mouse. I''m using the DirectInput action mapping code generated by the wizard, modified slightly to use the mouse axis rather than keyboard-based ones. Anyone know why this is happening? I guess I can just stick a ''deadzone'' of +-0.001f into the code, but that''s not a very neat solution.

Share this post


Link to post
Share on other sites
Advertisement
You''re using an optical mouse I assume? Just like it was with joysticks, I would suggest just writing a deadzone.

Share this post


Link to post
Share on other sites
Drat. So it''s definitely the hardware?

Given that I want to make my deadzone as small as possible, what should I go for? I''ve got it at 0.1f at the moment, which seems a bit large... I know that in the long run I should write code to calibrate it, but this is just a little concept demo.

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!