Universal Camera occasional rotation jitters

Hi there,
I’m trying to find the cause of a rotation jitter on the Universal Camera.

PG here: https://playground.babylonjs.com/#DWPQ9R#430

Please, scroll to the bottom to see where the camera is set up.
Disabling pointer lock seems to make the jitter go away.
Also seems like setting camera.inertia to zero may ‘help’ to make the jitter happen.
and that the jitter happens when rotating across certain angles.
Tested on chrome. To reproduce, move the camera around in the playground for a little while.
Sometimes it takes longer than others.

Does anyone know what causes this?
Or just confirm that they see it on their machine?
Thanks for any advice!

Adding @PolygonalSun

I’m not sure what specifically is going on with that but I suspect that it might be related to how the InputManager is handling deltas for horizontal/vertical mouse movements. I’ll try to take a look at it this week to see if I can determine the root cause.

1 Like

Thanks! Don’t know whether it helps but the jitter is very easy to see in this game:

https://morterra.com/

At least it looks like the same behavior.

Is it only jittering when not reaching 60 FPS or when the frame rate is not stable ? Asking as I am not able to repro.

FWIW, I can’t repro either.

1 Like

Any updates on this? I am getting the same issue on my project. There is very less jitter at inertia >= 0.5. But if I set inertia to 0.4 or below the jitter shoots up suddenly. I noticed, it only happens when the cameras position is changing. If the camera is stationary, then there is not jitter. The jitter does exist at a stable 60 fps.

Are you using latest 5.3.0 ? cc @PolygonalSun

Yes.

Unfortunately, I’m having issues with trying to reliably repro this so it’s proving very difficult to troubleshoot. Just out of curiosity @Ontropy, could I have you try out this PG and tell me if it repros for you: FreeCamera_MouseWheel | Babylon.js Playground (babylonjs.com)

1 Like

No it does not. Works perfectly for me. As mentioned I had been only noticing it when the camera was translating while rotating.

Now I took a break from that project because I was frustrated with the jitter, right now when I tried it locally, the jitter seems to have fixed itself (both at low and high dpis). I think it was one of those javascript things that fixes itself when you restart the browser or the pc.

Apologies for wasting time, but I did notice the jitter for 3 continuous days previously on this same build. I’ll update if it every comes back up and due to what changes.

1 Like

Sounds good. I appreciate the update.

1 Like