Preventing jittering while using LookAt with a moving object.

Hi, I have a tank-like character, where the bottom part can move freely and the top part can rotate to follow whatever point the mouse is over. Currently, I'm using a single placeholder model that just rotates as a whole while it moves (I'm not sure if this is relevant!). The problem is, the closer the lookAt point gets to the model, the more the model jitters as it moves. This seems to only be noticeable when the model is moving.

Here is my code:

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit, 100)) 
    var lookAtPos : Vector3 = hit.point; 
    lookAtPos.y = transform.position.y; 
    transform.LookAt(lookAtPos);

you could try smoothly rotating like this :

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
var smooth = 5;
if (Physics.Raycast (ray, hit, 100)) 
    var lookAtPos : Vector3 = hit.point; 
    lookAtPos.y = transform.position.y; 
    var lookRot = Quaternion.LookRotation(lookAtPos - transform.position);
    transform.rotation = Quaternion.Lerp(transform.rotation,lookRot,Time.deltaTime*smooth);

hope this helps :)