Search Unity

Controller Stick Input "Snaps"

Discussion in 'Scripting' started by Eingya, Jul 16, 2017.

  1. Eingya

    Eingya

    Joined:
    Jan 10, 2014
    Posts:
    8
    So I've been trying to get smooth control from a 360 controllers right thumb for a top down twin stick shooter, but the returned result seems to keep ever so slightly snapping to 1 and 0.

    I've set the dead zone to 0 and even tried retrieving GetAxisRaw, but regardless of what I do there seems to keep being this slight snap.

    I'm pretty sure that it's not due to how i process the input, given that i can clearly see the snap even when doing a simple ( Debug.Log(Input.GetAxis("AimX") + ":" + Input.GetAxis("AimY")); )

    Anyone has any idea on how to smooth the input from the controller?
     
  2. Phorsaken

    Phorsaken

    Joined:
    Dec 12, 2013
    Posts:
    27
    Being you have adjusted the dead zone I'm guessing you also made sure the snap check box was unchecked in the project settings input area?

    -Alexander
     
  3. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
    Bingo675 likes this.
  4. Eingya

    Eingya

    Joined:
    Jan 10, 2014
    Posts:
    8
    Yes The snap is unchecked and i actually used the method from that thread to do dead zones, but the input still gives me a weird small snap on the four cardinal directions...
     
  5. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,624
    With a dead zone of 0, Unity should not be adding any dead zone. Are you sure this is a snap? The Xbox 360 Controllers I've tested don't snap, but they do have a rather large range of movement where it returns 1.

    You could test with a trial of Rewired which gets input from native input sources by default to see if it does the same thing. If it does, it's something outside the control of software to correct (either hardware or driver).
     
  6. Bingo675

    Bingo675

    Joined:
    Jul 1, 2018
    Posts:
    13