Smoothing movements

Hi I’m trying to smooth the movement of a ball on a 2d plane. Here is the code. It works fairly well but It’s not reactive as i need:

void Update () {
    //float moveInput = Input.GetAxis("Horizontal") * Time.deltaTime * moveSpeed;
	speed = Input.acceleration.sqrMagnitude;
	newSpeed = Mathf.Lerp(speed, newSpeed , Time.deltaTime * 10 );
	float Move = Input.acceleration.y * newSpeed;
	speed = newSpeed;		

    transform.position += new Vector3(Move, 0, 0);

    float max = 14.0f;
    if (transform.position.x <= -max || transform.position.x >= max)
        float xPos = Mathf.Clamp(transform.position.x, -max, max); //Clamp between min -5 and max 5
        transform.position = new Vector3(xPos, transform.position.y, transform.position.z);

Ps. If you have good books on Physics for games please feel free to post the titles, so I won’t bother with this questions anymore :smiley:

get yourself a sphere collider and add a rigidbody, then tilt the plane to see the ball moveing smoothly this is all it needs, if you want to control it then look into rigidbody.addtorque or rigidbody.addforce.

do not use transform with objects witha rigidbody unless it is kinematic, for other stuff like moving platforms and stuff move the transform. read the reference on unity physics and see how they work you can find all the settings in edit/projectsettings and then selecting the help sign at the top of each component window.

thanks guys for you time!