Jittering framerate

This thing drives me crazy )

I have 100 fps in the editor and approx 800 fps in stand-alone build and nevertheless my game avatar (a box) moves with jittering. It looks like I have approx. 3-5 small lags every second.

I have moved camera following code to the LateUpdate. My box moves like:

 transform.Translate( new Vector3(
           x * 5 * Time.deltaTime,
           0,
           0 ), Space.World );

I have tried to shutdown as much process on my PC as possible. Still framerate is jittering.

Anybody experienced something like this?

Could you upload a build of your project somewhere, so I could test it, and see if the same happens here, because I couldn't recreate the error you described in the editor.

Thank you, Atnas, but I will try to make some tests by myself before spending your time.

2 Answers

2

I noticed this kind of jittering in one of my projects before and it had a lot to do with my camera's follow script. I by changing the damping on the camera (how strictly it followed my character) and it completely fixed the problem. For me having a camera with a very strict follow script, caused the screen to be very jittery and erratic. Hope this helps.

Ok, I will try to add damping to my camera soon. And will report here.

If you're using rigidbody by any chance, be sure to set the interpolation to "Interpolate" - this fixed some jerky weirdness for me.

Oh and definitely damp the camera--- because it looks way better :)