Search Unity

XBox 360 controller - 'dead' values to defeat 'loose' joysticks

Discussion in 'Scripting' started by davidnibi, Dec 2, 2019.

  1. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    426
    I'm pretty sure I've had this problem with every 360 controller, in that both (or at least the right stick) is never at 0.

    I can set the dead range to < 0.05 (which is the value it seems to rest at), but it plays hell with my current character rotation.

    In 'firing' mode, the gameobject character can rotation with camera with the right stick, or if it is at rest (ie 0), the left stick controls basic walk/rotation.

    However, the right stick is never really at 0, as stated above, and any give results in values to seem to 'lock' when they are the whole number area transferring between axis directions. There is visually 20 degrees of range where the controller joystick is 'dead', and I can't find any middle ground.

    Is there any other option for setting this up - I know the dead values in the input manager are responsible.
     
  2. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    426
  3. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,631
    It seems strange that 0.05 would account for a full 20 degrees of the joystick's arc. Are you sure it's that much? Aside from the magnitude, this sounds just like every other video game I've ever played, so I'm not sure I understand the problem.

    Do you think that you have to press the joystick to far before the view starts to rotate?
     
  4. davidnibi

    davidnibi

    Joined:
    Dec 19, 2012
    Posts:
    426
    I was a li'l bit exaggerating possibly. :)
    0.05 equates to 9 degrees of rotation, but the degrees gets smaller the slower you move the joystick (for accuracy). The 'wear' (is it?) in the controller is making it unusable.