I've created a system where ScreenPositionMain object is where the screen is centered. This object follows the player to make it so when the player moves the camera doesn't suddenly move the same speed as the player.
This ScreenObject's speed depends on the distance between the player and the object.
The problem is that when this object follows the player it is not smooth and the object is going back and forth between a pixel or two while following. This problem is fixed when I increase the speed of the player, but I can't do that for gameplay purposes.
If anyone has any ideas for how to make this work nice and smooth I would greatly appreciate it!