Keyboard delay on Input.GetAxis

In the following code there is a delay between pressing the horizontal axis keys (a, d and the arrow keys) and the value changing that is not apparent with the key that does “thrust” (ctrl).

Can anyone tell me how to remove the keyboard delay?

Ta,
Rich.

var xThrustAdd = 25.0;
var xThrustMax = 50.0;

var yThrustAdd = 25.0;
var yThrustMax = 50.0;

var grounded = false;
var gravity = -9.8;

private var velocity = Vector3.zero;

// this is for the Character Controller 
var controller : CharacterController;
controller = GetComponent(CharacterController);

function Update ()
{
	if (grounded) velocity.y = 0;
	
	if (Input.GetButton("Thrust"))
	{		
		velocity.y += yThrustAdd * Time.deltaTime;
	}

	if (velocity.y > yThrustMax) velocity.y = yThrustMax;
	velocity.y += gravity * Time.deltaTime;					// add gravity
	
	if (Input.GetAxis("Horizontal") == 1)
	{
		velocity.x += xThrustAdd * Time.deltaTime;
	}
	else if (Input.GetAxis("Horizontal") == -1)
	{
		velocity.x -= xThrustAdd * Time.deltaTime;
	}		
	else
	{
		velocity.x /= 1.2;
	}

	if (velocity.x < -xThrustMax) velocity.x = -xThrustMax;	
	if (velocity.x > xThrustMax) velocity.x = xThrustMax;	
	
	print(velocity.x);

	var flags = controller.Move(velocity * Time.deltaTime);
	grounded = ((flags  CollisionFlags.CollidedBelow) != 0 );
	
//	controller.transform.Rotate(rotateDirection * Time.deltaTime, rotateSpeed);

}

Nothing in that code will cause a delay of the keypress, but what you are assuming is that the value goes to 1.0f or -1.0f which is really a matter of setting the sensitivity in the Input settings.

Thanks, I changed the value to 100 and it responds instantly. However, I’d imagine this is unnecessarily high!

I understand what you mean about the getAxis being not entirely suitable for what I wanted now also!