When Is A Mouse Not A Mouse?

edited 2009 Mar 10 in Developers
<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.

Comments

  • The sensitivity of the axis grabbing is currently controlled by the symbolic echo from B_Responder(). Take a look at <tt>b_main.c</tt> (line 772):

    <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>.
  • For me, on my system, doubling the deadzone to <b>.02f</b> resulted in a much more usable default. How does this feel for you?

    I agree that these should probably be cvars.
  • .02f seems fine. Although I guess a more appropriate way would be to check the accumulation instead of the movement speed, so that a long slow movement of the mouse would qualify, too.
Sign In or Register to comment.