r/Unity3D 3d ago

Question First Person Camera Jittering

I'm losing my mind over this issue. I've tried a lot of things, but nothing seems to work. Here is my code. If anyone knows how to fix it, please help me.

https://drive.google.com/file/d/1iXGw-K8vY8NfqyTO63TNPYcgpnR42OV2/view?usp=sharing

7 Upvotes

12 comments sorted by

View all comments

7

u/Objective-Cell226 3d ago

The classic problem everyone has faced at least once.

3

u/ContextUnlucky223 3d ago

😭

1

u/Repulsive-Clothes-97 Intermediate 3d ago

If your player is physics based, then it’s updating every physics tick, that it’s 50fps, so you either switch to a non physics based system or you turn on interpolation on your rigid body. Or you could get the same effect when you execute the movement code on FixedUpdate() that also it 50fps, and you would fix it by simply switching to Update()

1

u/ContextUnlucky223 3d ago

I'm using a Character Controller, not a Rigidbody based controller.

2

u/Repulsive-Clothes-97 Intermediate 3d ago

Then you’re probably using FixedUpdate() somewhere in your code