Need help with camera stuttering when smoothed

First part of the video: Camera is “locked” to the character, no stuttering.
Second part: Camera is “smoothed” with a spring that follows the character, stuttering.

What’s the problem?

The character is moving with just physics (and Humanoid:Move() on ground), no CFraming going on.
I’m using Quenty’s spring module to do the smoothing. Previously I was using a different way to smooth the camera, but it’s the same issue nonetheless.

I’ve tried:

  • Different renderstep priorities (from First to Last), no difference
  • Different code order (where i calculate my input/movement code), no difference

Here’s the part where the CFrame is applied to the camera.

Help…

1 Like

I can’t see the stuttering very well in the video, but have you tried changing the spring parameters? Could you also show your spring code? There are some ways spring code can be incorrect to result in stuttering like what seems to be in the video.

You can try it here, press V to switch to LockedCenterCinematic (then multiple times to cycle back to LockedCenter

What could be wrong with the spring parameters? I’m just using Quenty’s spring module which is pretty popular, so I didn’t think that could be an issue…
The numbers I have in there are set to what I think looks best:
damping at 2, speed at 50
image

1 Like

From the game, it looks like the spring module is working as expected.

I wouldn’t call that stuttering. Instead, it just looks like perhaps a direct linear movement between the current camera position and the goal isn’t ideal. It seems to work fine until the camera is spun.

I think perhaps splitting the smoothing into two parts would work better: one part for the rotation around the character (or wherever the camera center is) and one for the rotation-independent position?

1 Like

Forgot to update this, but I did find the solution already, that’s why the place works fine now😅
It’s found in the Platformer template, in SmoothCameraScript.

The solution is to offset the camera based on velocity, not position.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.