How to Lerp and Clamp

So far I got my Camera to point to where the mouse is, but it really likes to spin out and I don’t know how slow/Lerp it or clamp it so it doesn’t turn when the mouse is in the middle of the screen.

And thats what I got so far

	void Update() 
	{
		Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
		RaycastHit hit;
		if (Physics.Raycast(ray, out hit, 100))
			Debug.DrawLine(ray.origin, hit.point);

		transform.LookAt(hit.point);

		

	}

Instead of using transform.LookAt (which doesn’t specify orientation), assign the rotation directly:

transform.rotation = Quaternion.LookRotation( (hit.point - transform.position).normalized );