Because of default SmoothFollo2D script my ball is not moving smoothly. How to fix that?

1

Here is a code, attached to ball:

void FixedUpdate () {
        if (Input.GetKey(KeyCode.RightArrow))
        {
            rigidbody.AddForce(Vector3.right * 5);
        }

        if (Input.GetKey(KeyCode.LeftArrow))
        {
            rigidbody.AddForce(Vector3.left * 5);
        }
	}

Try

rigidybody.AddForce(-Vector3.right * 5 * Time.deltaTime);

This will add a smooth update. You could also try putting it in just Update and see how it reacts.

Maybe you have luck with this code:

#pragma strict

var rotationSpeed = 100;

function Update () {

	var rotation : float = rotationSpeed;
	rotation *= Time.deltaTime;
		
	if (Input.GetKey(KeyCode.LeftArrow)){		
		rigidbody.AddRelativeTorque (Vector3.left * rotation);
 	}
 	
 	if (Input.GetKey(KeyCode.RightArrow)){
		rigidbody.AddRelativeTorque (Vector3.right * rotation);
 	}
 }

I tried this in Unity and it seems like the Ball moves smooth. Give it a try.

You shouldn’t be listening for input on the FixedUpdate.
You should listen for input on Update and apply the force on the FixedUpdate. Use a boolean to control this.

void Update(){
    if (Input.GetKey(KeyCode.RightArrow)){
       moveRight=true
    }    
}

void FixedUpdate () {
    if (moveRight){
       moveRight=false;
       rigidbody.AddForce(Vector3.right * 5);
    }
     
}

using UnityEngine;
using System.Collections;

public class CameraController : MonoBehaviour {

    public GameObject player;
    private Vector3 offset;

	// Use this for initialization
	void Start () {
        offset = transform.position;
	}
	
	// Update is called once per frame
	void LateUpdate () {
        transform.position = player.transform.position + offset;
	}
}