Cinemachine fps camera jumps to next frames when moving

fps camera:

9844017--1416564--upload_2024-5-20_0-2-50.png


player movement:

Seems like a performance issue to me. Some frames, Time.deltaTime gets too large, causing a noticeable jump. Doesn’t necessarily have anything to do with cinemachine.

If you just move a square with Time.deltaTime, does the same jump occur?

using UnityEngine;

public class MoveRight : MonoBehaviour
{
    public float speed = 5f;  // Speed at which the GameObject will move to the right

    // Update is called once per frame
    void Update()
    {
        // Calculate the movement distance for this frame
        float moveDistance = speed * Time.deltaTime;
       
        // Move the GameObject to the right
        transform.Translate(Vector3.right * moveDistance);
    }
}
1 Like

Yes, this happens, although less than before. You’re right, this problem happens more when my computer gets hot. So how can I solve this situation?

What are your specs? What’s the cooling like? Something is stressing your system so much it overheats and starts throttling or something.

Might be difficult to solve it without getting new hardware.

Does it happen in an empty scene with just that 1 moving square too?

No, I tried it on a stage with 5 squares, I had problems when I was close to them.
My computer specs: cpu intel i5 11.gen, ram 16gb, gpu nvdia gtx 1650

The strange thing is that there is another project where I did the same operation and it works there without any problem. In that project, I used the 2021 version of unity and now I am using the 2023 version.

Specs definitely should be enough.

Is it a laptop? Are you sure the 1650 GTX is actually used and not the integrated graphics (if your CPU has those)?

Yes, laptop and I’m sure the gpu is used. But I don’t understand why unity works in 2021 but not in 2023 :frowning:

Status update: I got the build and tested it and there seems to be no problem. I thought it was problematic when I bought the build before, but I don’t really understand why this happened.

Small thing, but check if Vsync is on in your Game View. If it’s off it will be trying to suck as many frames as your hardware can manage.