Sprite with non-constant jitter during constant velocity movement.

I know how many people have asked a similar question before, and I’ve read each one a thousand times, but this one is slightly different and I can’t figure out how to fix it, but I know the solution is probably very similar.

I have sprites with rigidbody2D, and a movement script attached, the script just makes them move in the negative y direction forever. Very simple movement.

void Update() {
    float rigidVelocity = 100f * Time.deltaTime;
    
    transform.rigidbody2D.velocity = new Vector3 (0, -rigidVelocity, 0);
}

For some reason, every second, it seems to move with jitter, then the next second it’s perfectly smooth, then the next second jitter, next second smooth. I have no idea why. Before, I was using a unity sphere and it was perfectly smooth, i switched to sprites and it became jittery, but the 1 second smooth 1 second jitter pattern confuses me. I’m sure it’s a super simple fix, but I can’t seem to figure it out.

There are quite a few terms for what “Jitter” defines. Frame spikes can be due to other scripts getting stuck in a long loop trying to process data in the Update() event. Non-frame spikes could be the result of either Floating Point inaccuracies due to rounding (effects you more the farther from Vertor3.Zero you are). Non-frame spikes could also be due to you having more than one collider on an object that in some frames, affects one of the other colliders. It’s like the world telling you this object is a Siamese twin, but you’re both fighting to stay separate. Additionally, I’ve found the background profiler in unity will cause spike data on garbage collects, and some background processes and services can generate steady hiccups in games as simple as Minecraft.

Man i had the same issue but i fixed it by going to my prefab that had the sprite and in the rigidbody in the interpolate i used the extrapolate value.