The approach below works well when the player is only moving in one direction but in a top down game where the player moves in 4 directions I have to change the camera position based on the angle of the player, and the change in angle results in a sudden and jarring shift in camera position:
Player is between 135 and 225 degrees
set position to (lerp(Camera.X, Player.X - 1000, 0.05), lerp(Camera.Y, Player.X, 0.05))
Player is between -45 and 45degrees
set position to (lerp(Camera.X, Player.X + 1000, 0.05), lerp(Camera.Y, Player.Y, 0.05))
Player is between 225 and 315 degrees
set position to (lerp(Camera.X, Player.X, 0.05), lerp(Camera.Y, Player.Y - 1000, 0.05))
Player is between 45 and 135 degrees
set position to (lerp(Camera.X, Player.X, 0.05), lerp(Camera.Y, Player.Y + 1000, 0.05))
I'd like to smoothly move the camera in a circular motion as the player changes direction. Any suggestions appreciated.