Game camera movement issues
So, I made this program where the camera tracks the player. The idea is that the camera will move to a spot that’s between where it was 0.005 seconds ago and the player’s current position to create this smooth movement effect. Well, the result isn’t exactly what I hoped for.
At first, when the player moves in a straight line, the camera follows normally. But after a few seconds, it starts shaking from sideandand to side (like in movie I posted), and the shaking just keeps getting worse the longer it goes on. It’s honestly driving me nuts.
This is the program
The variable MovementCameraDelay is set to 0.005f and EndTime is 0.25f.
MovementCameraPos is a position which at the position 3.5 above and to the right of the player, its parent object is the player, so it will move with the player.
(I hope you can understand this question, because I translated it using Google Translate and my native language is not English.)