Making camera move at the same speed as the player but not follow them
I'm creating an endless runner and so I'd like the camera to move at the same speed as the player but when the player hits the edge of a platform because of a bad timed jump, I'd like the camera to go on and not wait for the player to get on top of the platform (which hapenns if we simply set the camera's transform to the player's).
I've tried two things: a) adding a RigidBody2D to the camera and setting the velocity to the same as the player's in Start() b) using a dummy empty object to move at the same speed as the player and the camera to just take its transform
Both resulted in the same kind of stutter which I can't explain or get rid of. It looks like this: http://tigro.itch.io/endless-runner?secret=I2PCFNojhOzT6CQhuFHoDR0F1a4
How do I make it move smoother?