[DirectInput] Mouse values never zero

Started by
1 comment, last by superpig 20 years ago
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.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Advertisement
You''re using an optical mouse I assume? Just like it was with joysticks, I would suggest just writing a deadzone.
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.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement