# How those inputs work? Why there are differences in movement in -game?

I created a game in my studies, and theres is a coop mode. PlayerOne and PlayerTwo have two different inputs methods and they behave differently. PlayerOne seems to have a delay between the time I press the key and the time to execute the command. PlayerTwo goes to the direction at instant time. Or maybe PlayerOne have an acceleration time and PlayerTwo gets the velocity instantly.

My code:

``````   void CalculateMovement()
{

if (_PlayerTwo == false)
{
float HorizontalInput = Input.GetAxis("Horizontal");
float VerticalInput = Input.GetAxis("Vertical");
Vector3 direction = new Vector3(HorizontalInput, VerticalInput, 0);

if (_speedBoostActive == false)
{
transform.Translate(direction * _speed * Time.deltaTime);
}

else
{
transform.Translate(direction * (_speed * 1.5f) * Time.deltaTime);
}

}

else
{
float _speedboost = 1.0f;
if (_speedBoostActive == true)
{
_speedboost = 1.5f;
}

{
transform.Translate(Vector3.up * _speed * _speedboost * Time.deltaTime);
}

{
transform.Translate(Vector3.down * _speed * _speedboost * Time.deltaTime);
}

{
transform.Translate(Vector3.left * _speed * _speedboost * Time.deltaTime);
}

{
transform.Translate(Vector3.right * _speed * _speedboost * Time.deltaTime);
}

}

transform.position = new Vector3(transform.position.x, Mathf.Clamp(transform.position.y, -3.9f, 0), 0);

if (transform.position.x > 9.6f)
{
transform.position = new Vector3(-9.6f, transform.position.y, 0);
}
else if (transform.position.x < -9.6f)
{
transform.position = new Vector3(9.6f, transform.position.y, 0);
}

}
``````