Input Manager DEAD NOT WORKING?

hello…
i am try to set up an xbox360 controller…
this is the setup…

if dead is = 0.1 why the hell the program releve the value of -0.04648067 with this code???

void Update () {

float secStickHorizontal = Input.GetAxis(“Horizontal”);
Debug.Log(secStickHorizontal);
if (secStickHorizontal != 0f) {
if (secStickHorizontal > 0) {
transform.position += Vector3.right * Time.deltaTime ;
}

if (secStickHorizontal < 0) {

transform.position += Vector3.left * Time.deltaTime ;
Debug.Log(“oRIZONTALE”);
}
}

my cube ALWAYS MOVE…
i am seriusly think that unity is very bad language , from the beginning i met only bug :S :S :S

1 Like

Because the deadzone is applied to the raw value. What you are logging is the final value after the dead zone has already been applied. It means your joystick’s dead zone needs to be larger than 0.1 because your joystick has a lot of drift. In my experience, Xbox 360 controllers can need a dead zone up to 0.25, especially if they’re older and worn out. Secondly, your vertical dead zone is only 0.001, which is basically nothing, so you will always receive vertical input.

1 Like

ok thank you :slight_smile:

I’m also playing the the Dead Zone for the Analogue stick atm.
I’m prbly totally not getting something.
Cause I can turn the Dead Zone for Horizontal and Vertical to 100000 or anything I want, the controls always work the same. I have a light drift in my controller’s analogue stick and I just wanted to fix that.

Atm it seems easier to just make my own dead zone in script than making this work.

How do I make Unity actually care what value I put into the “Dead” field?
thx