Impossible to get perfectly smooth camera movement?

I can’t believe this, but for some reason, I cant get truly smooth camera following in Unity. I don’t know what I’m doing wrong.

So, to make things simple, this is basically how to reproduce what I am seeing.

1.Make a box collider-rigidbody with interpolation turned on and mass set to 1400.

2.Add a script to push the box in a direction:

function Update () {

3.Now add a camera follow script. Something extremely simple like this:

var target:Transform;
function LateUpdate () {

What you will see is the box getting closer and further from the screen as if the delta time was coming in at random.

I have tried several different timing variables, each in a different update function, and it’s always this jerky movement no matter what I try.

I guess I’m going with a different approach that doesn’t use smoothing. It will still look good, but I’ll have to add in my own Z factor that will just be a simple smooth velocity based float. The camera movement will look less natural, but oh well… It’s not like I really need it anyway.

Firstly, you should be calling your physics related functions in FixedUpdate(), not Update().

I’d also suggest looking at the SmoothFollow camera script that comes with Unity, it works fine for me following rigidbodies with forces applied to it.