Gamepad Input, Kaput

Hey!

I have a problem with the joystick input. i try to tweak those values - sensitivity,dead zone, gravity but it always returns 1 instantaneous.
i can’t get it to smoothly go to 1 like with the Keyboard keys.

if there is a quick way to smooth the input in my controller script i would be happy to hear where to find that, but i keep telling myself i got something wrong in the input manager… or is the gamepad not allowing a smooth input transition?

I’d very much appreciate a quick answere, thanks.

is the SimpleMove not working with this kind of input?

        var newSpeed = Input.GetAxis("Vertical") * speed;

	var forward = transform.TransformDirection(Vector3.forward);
        controller.SimpleMove(forward * newSpeed);

it’s smooth with keyboard keys, but not the “analog” joystick. so if i cant solve that bit with the input… Can i easily add smoothing from 0 to 1 over time, to this code?

thanks

Hmmm how did you setup this entry in the input parameters? I have done this with an xbox controller and the input is definetily analogue.

maybe the speed variable is not a float, that could be turning the result into an integer. Make sure your default speed has a decimal place value =10.0 per example.

Thanks for the quick reply

I don’t know if there is a specific way to create a analog vs digital input, except that i got an extra Horizontal and Vertical input dropdown in the manager. I just played around with the settings for the input of the joystick axis, But it hasn’t helped.
if i change sensitivity it either gets constantly slower or does not work, or it gets constantly pressed down without being pressed, like its not capable of being smooth.

maybe it’s supposed to be like that? I just wanted the smooth input like you get from the keyboard…

The script is only made with floats, so that should not be the problem, and it’s smooth with keyboard input.

hmmm try with the other input names and use code like this to read the values, also adjust the dead zone and the sensibility.

public string MyInputName="Vertical";

void OnUpdate(){

    float  currentValue= Input.GetAxis(MyInputName);
    Debug.Log (currentValue);

}

The values you receive should be between 0 and 1