I am trying to achieve the camera follow like Ketchapp's game "Zigzag".
I will try to explain the best I can; I have two objects, Player (a sphere) and Camera:
- Player can only move to the left and forward.
- Camera moves forward and always keeps the same distance from the player.
I have tried different things like moving the camera and player at the same speed and decreasing/increasing the speed of camera depending on the distance between them, but in vain.
You can watch the gameplay here https://www.youtube.com/watch?v=5XbPcubaTJI Note how the camera follows the player and just moves forward (not to the left or to the right).