Camera jitter/lag in 3rd person when moving character and camera at the same time

reid

New member
Hello!

Apologies if this is answered elsewhere on the forum – I found some other threads talking about camera jitter but none that seemed to fix my issue.

I'm experiencing a choppy camera / jitter / movement lag when I move the character and the camera at the same time.

I've made a screen recording where you can see the issue, which you can find HERE since I can't seem to attach videos directly to the forum.

In the screen recording:
  1. First I move just the character – no jitter / lag :)
  2. Then I move just the camera – still smooth :)
  3. Then I walk around the car while also rotating the camera around the car – and it's super jittery / laggy. Look specifically at the car to see this.
I saw in another thread you recommended setting position smoothing to 0 to solve jitter, and I've done that, but no luck. I also attached a screenshot of my settings on the camera.

Please help! I'd love to get this fixed.

Thank you!
Reid
 

Attachments

  • Screen Shot 2022-02-13 at 4.22.36 PM.png
    Screen Shot 2022-02-13 at 4.22.36 PM.png
    255 KB · Views: 4
I wasn't able to see any jitter from your video but it's likely because of the low resolution. But if you can reproduce it within the demo scene of a fresh project I'll have a better idea.
 
Hey Justin,

I'm having the the same issue in the demo scene in a fresh project. I've made a new screen recording and also uploaded it to Google Drive instead of Imgur in hopes it will have less compression. Video can be found here.

The jitter/lag is most noticeable if you watch the crate/box, specifically the black square on the side of the box, on top of the platform that I am orbiting.

Thank you!
Reid
 
Hmm, I'm not able to reproduce that. What does your profiler look like? Have you tried a fresh scene with no geometry besides a plane?
 
I think the problem is still happening in a scene with just a plane – but it's harder to see because the jitter/lag is most noticeable on objects you rotate around.

Attached are a couple screenshots of my profiler – first while the game is running and then second afterwards. I also exported the profiler data into a file which you can find here. Notice anything out of the ordinary there?

Thank you!
Reid
 

Attachments

  • Screen Shot 2022-02-14 at 8.39.33 AM.jpg
    Screen Shot 2022-02-14 at 8.39.33 AM.jpg
    829.6 KB · Views: 7
  • Screen Shot 2022-02-14 at 8.40.38 AM.jpg
    Screen Shot 2022-02-14 at 8.40.38 AM.jpg
    822.5 KB · Views: 7
In your first screenshot you are dipping to less than 30fps which will cause jitter at 60fps. Your second screenshot looks good. You could try using the profiler to track down what is causing those spikes.
 
Got it thank you! So in theory this issue wouldn't be happening on a more powerful machine, correct? If that's the case I think I can live with it for now – I'm working on a Mac and could probably be using a better computer.
 
Yes, it does look like it's rendering related so a more powerful GPU would help :)
 
I am working on a Mac, too. The editor is just no good reference for performance on Mac. Try building the project and see how it performs then.
 
I agree looks like a rendering issue. Probably a compatibility issue with Unit Editor and your graphics card.
Maybe search to see if others have a issue with Mac editor with that same issue in the Unity Forum.
 
Hmm I tried building the project and if anything it's actually worse playing the build rather than within Unity... Screen capture here.

Do we still think this is just my GPU?
 
Does it jitter when you play other games. try to find a mac 3d game.
Your scene is pretty simple. Its pretty crazy gpu would even be causing that jitter honestly. Your mac would have to be pretty old.

When you play the demo you have tons of jitter moving around?
 
I just tested a few 3D games on my Mac and no, I don't encounter this issue in other 3D games.

Here's a new screen recording.

In Unity, I thought I only encountered the jitter when I move the player and the camera at the same time. So like if I orbit something – if I move around an object with the left stick and use the right stick to keep the object in question in the center of the screen, it jitters. So if I only move the character without touching the camera, or only move the camera without moving the character, it's fine.

But looking at this new screen recording though – it's possible the jitter IS happening any time I move the camera, just harder to see than when orbiting. So maybe this IS a camera problem?

What do you think?
 
You will need to look at the profiler in order to get a better idea of what the cause is. Based on your previous image it does look like it's GPU related though.
 
Just have to say I stopped using newer version of UFPS Controller after 3.2.6 as there in fact is a kind of minimal jitter when looking around in the next version of UFPS (when there was a rewrite to fix some high-fps issues or something like that). It's visibly smoother in 3.2.6 for me and I haven't found the cause of the problem, just stayed on an old version.
It's just that smoother and and faster, especially when using a weapon with a scope and on a procedurally generated mesh terrain. But even without scopes, there's a few (5-20) fps drop in the subsequent version and the one after that. I haven't tried the newest though, will check it out soon. So I'd certainly recommend not to the discard such issues and keep looking into the matter for longevity of the project as it's really convenient and complete, extensible.
Performance/smoothness of mouse look are really important factors for any character controller. So I'd say it's not just about GPU, I've RTX 2080 and it was visible even in demo scene on PC. I'd compare that old version with newer, I think it's gonna be noticeable.
 
Ok super strange update to report: the weird jitter lag doesn't happen in a build when I'm using my monitor. It only happens when I'm displaying the build on my Macbook's built in retina display.

Same build, same computer running the build – but if I use my built in laptop display: crazy jitter. If I use my monitor: super smooth.

Any ideas?
 
I'm not sure - this sounds like a more general Unity issue so I would try posting on their forum.
 
Top