Search Unity

I bought a new PC Game-pad but it has a ' Drift ' . .

Discussion in 'Getting Started' started by jbb1979, Aug 28, 2019.

  1. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    320
    Hi I got a Logitech F310 Controller and, it's nice and, it immediately work in Unity . . But, it has a slight drift, so when it's in neutral position, the player actually moves . . I've Debug.Log the value and, when I don't move the controller, in neutral, it says it actually has a value of 0,0103384 . .

    Please help - -

    logit78235235.jpg
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,191
    You need to calibrate the controller using whichever software package is intended for it. If it doesn't have one or it doesn't have the option you need to calibrate it through your OS. Below is the guide for Windows 10.

    https://www.howtogeek.com/241421/how-to-calibrate-your-gaming-controller-in-windows-10/

    Beyond that you need to set the dead zone of the controller. The deadzone is the position an axis is in when it either doesn't or shouldn't respond to input. Every controller has a different number for this. A properly calibrated controller will have a smaller one than a controller that hasn't been calibrated.

    https://docs.unity3d.com/Manual/class-InputManager.html
     
    jbb1979 likes this.
  3. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    320
    I found in ' Input manager ' there's something called a ' dead ' value, it's in Project manager, it says on Unity API Info, ' Dead ' value is automatically cut to zero, below that, my constant drift was 0.02 I, set Dead value to 0.1 so, every-thing less than 0.1 is ignored and, made Zero - - it worked immediately, I Got very Lucky as I was reading for fun - -

    InputSetAll.png

    it's Right beneath Gravity setting and, Above ' Sensitivity ' X X$

    i Got lucky I was reading By accident lol