jittery camera function

I’m developing a racing game where you control a marble. For cinematic and ease of access purposes I made it where the game controls the up and down movement of the camera automatically based on upward and downward momentum. However, when the character is falling at a consistent speed for an extended period of time, the camera shakes up and down slightly. The further you fall, the more obvious it becomes. I have tried several solutions including camera rotation lag, but that only pads down the issue a little. Does anyone have a solution to this? Here is some code and footage


This feels like a world origin issue. To test this wait for the camera to start shaking, then execute the following console command: “SetWorldOrigin”, if it worked, then you need to set the world origin every time the camera reaches a certain distance (from the last location you executed the console command at, not from the player start or the world origin location)

Sorry for the late reply, I figured out that its because when I calculate momentum, it keeps calculating different varying values even though the character is falling at the same speed. this video shows an example. the values being printed are the momentum values as they are being calculated. I still don’t Know how to fix this though. https://youtu.be/c0xBiYjcLck

Looking at the video, could it be that the SpringArm has “DoCollisionTest” set to True, thus causing the extra momentum? Also did you try removing DelayUntilNextTick?

yes, ive reworked the function to run on the Event Tick event. here’s a recent screenshot


the event tick is off to the left side of the screen. also, the add force is just to add stronger gravity, i tried running without it and the camera still shook.

I’ll have to try the DoCollisionTest idea next time im on unreal. I’ll let you know if it works when I try it.

I tried the DoCollisionTest and it didn’t work. Any other Ideas?

Ok, I just noticed something very interesting, I created a new level that was mostly empty for bug testing and the camera glitch was completely gone in that level only. EDIT:
One thing I figured out. I created a new level for bug testing purposes and the camera glitch was completely absent. I figured out that Event Tick (what is running the camera code) was set to run every frame, so it ran more frequently and smoothly in the test level that had less to render, thus having a higher frame rate. I set event tick to run every 0.01 seconds but there is still some jitter. Is there a function I can use to run the code frequently regardless of frame rate and processing speed?