my character looks jerky when moving?

so i am making a 3rd person game and my script makes my character movement jerky looking. the script is attached to the camera:

public class camFollow : MonoBehaviour {

	public LayerMask mask;
	public Transform[] target;
	public float height;
	public float distance;
	public float x;
	public float y;
	public float yMin;
	public float yMax;
	int i = 0;
	
	void Update () {
            x += 3 * Input.GetAxis ("Mouse X");
		y += 3 * -Input.GetAxis ("Mouse Y");
		if(y > yMax){
			y = yMax;
		}
		if(y <yMin){
			y = yMin;
		}
		
		Quaternion rotation = Quaternion.Euler (y, x, 0);
		//Quaternion rotation = target*.rotation;*

_ Vector3 pos = rotation * new Vector3(0, height, -distance) + target*.position;*_

* transform.rotation = rotation;*
* transform.position = pos;*
* transform.position = Vector3.Lerp (transform.position, pos, Time.deltaTime);*
_ transform.LookAt (target*);
RaycastHit hit;
if(Physics.Linecast(target.position, transform.position, out hit, mask)){
float tempDistance = Vector3.Distance(target.position, hit.point);
pos = rotation * new Vector3(0, height, -tempDistance) + target.position;
transform.position = pos;
}
}
}*

what should i change to make the movement smooth? (it is the camera making the jerkiness not the animation, also target is an array because there is multiple characters that you can switch through, no i do not want to use the script smoothfollow so don’t suggest it?_

A question for you in return. If you disable Vsync does that camera jerkiness retain or disappear? Vsync can be found under the quality settings as “Vsync Count”.

EDIT:
You should try leaving the character movement in the update function and move the camera following code into a late update function. Late update works so that it is carried after the update code for that frame has executed ie. it won’t update camera until your character has moved and therefore is not trying to play catch up all the time. Info about Late Update can be found below at the link.

EDIT 2:
Also if you have an option menu or if you are just working on a prototype, to make sure you are not overworking your graphics card, limit the max frame count your unity game pushes by making a new script with an awake function and throwing it on your camera. The way it works is you usually have Vsync on OR the frame limiter and you can’t have both on at once.

function Awake () {
   // Ideal smoothness, but you can try 60 if you want...
   Application.targetFrameRate = 120;
}