Skip to main content
gamedev.net
🔒 Locked

[DirectInput] Mouse values never zero

Started by superpig Mar 29, 2004 at 4:44 PM 1 replies 550+ views
Original Post
superpig
superpig
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
Michalson
Michalson
You''re using an optical mouse I assume? Just like it was with joysticks, I would suggest just writing a deadzone.
superpig
superpig
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.