follow camera is jerky for other objects

I’m using the following code to have a camera follow an object. Whichever object the camera is looking at is followed smoothly, but other objects in the scene appear to have jerky movement. If I turn it off all objects move smoothly.

target is the gameObject I want to look at.
offsetVector is Vector3(0,10,40); is to position the camera above and away from the target.


This is in the update loop.

This can happen if both your camera and object it is looking at are both updating in Update(). You will want your camera to update after the object is looking at is done making its movements. So put your camera update code in LateUpdate().