Camera lag/stutter - how to fix?

Hello! In the name of practice, I started working on a side-scroller timing game like “The Impossible Game”. I can’t seem to wrap my head around why, but for some reason the camera is noticeably laggy and stutters frequently in-game. It’s not terrible at all, but it’s definitely felt, especially in a timing game. It’s always random and I kept my eye on the framerate and it was always fine. Not only that but it was just the movement that seemed laggy; if I kept my eye fixed on the player himself, there was no lag in his animation (which would have been noticeable if it was normal lag).

Just a visual aid, obviously you’re not gonna be able to tell from a gif @ 25fps:

For this game, the player’s character spins whenever you jump. Therefore I can’t have the camera stuck to the actual cube, because then the camera would flip with the character every time you jump. Since neither the spring arm nor the camera can have rotation restraints (that I know of at least, if there’s an alternative please let me know), I ended up doing it manually like this:

(event tick)


So every tick, the camera’s position in the y axis would be updated to match the player’s+500 (so it’s moved to the right), and it would just take its original x and z to remain the same. I thought this could be it so I removed it but the stutter was still noticeable even if the camera was left attached directly to the player. I tried setting up different locked framerates to see if that affected anything but it didn’t. I also tried playing the game after packaging it with different settings (from dev to shipping, low quality settings to high quality settings) and the lag still persisted. It has to be the camera.

Any clues? Thank you!

A quick work around may be to enable the camera lag for the spring arm.

What do you mean? I already tried enabling camera lag, but only to see if it would make it work a bit smoother. I can’t constrain the rotation with camera lag (as far as I know)

did you solve this? Im having the same issue, no matter how i move the camera, with offset, world position, een invisible character walking, camera lag, even if theres no real fps drop

This is a very old question, but it showed up near the top. A workaround is, instead of what you’re doing, DO attach the camera to the player, but make he cube a component. That way, it can spin while the camera doesn’t.

I’m also getting the camera lag/stutter. Im making a similar game and it doesn’t matter if i attach the camera to the player or if i use a timeline to lerp a camera actor.

Someone must have a fix for this?!

@UnconvAustin has a point…

honestly though… for efficiency and smoothness… I’d suggest not using a scene component or a cube and instead use a surprisingly rarely mentioned BP node called Set Absolute Rotation that I think was built for this situation… so that the spring arm can be rotated (or kept unrotated) independently yet still move as a child component with all the smoothing benefits of spring arm location lag including substepping.

(BTW… there is also Set Absolute Location and Set Absolute Scale and a node that combines Set Absolute Location Rotation Scale in checkboxes)

1 Like