When Is A Mouse Not A Mouse?
<i>This post was originally made by <b>danij</b> on the dengDevs blog. It was posted under the categories: Engine, Games.</i>
Currently it is rather awkward to use the game controls menu to change control bindings for any mouse control, axis or button, as the slightest axis movement will be detected and subsequently, grabbed and (re)bound.
It seems to me that in this context, what we actually want is for the mouse to behave more like the POV hat on joysticks than as a mouse, i.e., directional rather than pointer.
If dynamically changing an axis type is not possible/desirable then we could consider temporarily overriding all axis deadzones (regardless of the device and axis type), setting a high range whilst grabbing.
Currently it is rather awkward to use the game controls menu to change control bindings for any mouse control, axis or button, as the slightest axis movement will be detected and subsequently, grabbed and (re)bound.
It seems to me that in this context, what we actually want is for the mouse to behave more like the POV hat on joysticks than as a mouse, i.e., directional rather than pointer.
If dynamically changing an axis type is not possible/desirable then we could consider temporarily overriding all axis deadzones (regardless of the device and axis type), setting a high range whilst grabbing.
Comments
<tt>if(ev->axis.type == EAXIS_ABSOLUTE && fabs(pos) < .5f ||
ev->axis.type == EAXIS_RELATIVE && fabs(pos) < .01f)</tt>
Try increasing .01f and see what would be a comfortable value.
Those should probably be cvars, something like <i>input-symbolic-deadzone-relative</i>.
I agree that these should probably be cvars.