0
\$\begingroup\$

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).

\$\endgroup\$
3
  • \$\begingroup\$ um I might need you to point out where's the difficult bit in that video, because all I saw is a view that continuously scrolls up at constant speed. \$\endgroup\$
    – jhocking
    Jul 5, 2017 at 18:50
  • \$\begingroup\$ Almost certainly neither the player nor the camera are moving, but rather that the level itself is scrolling past. \$\endgroup\$ Jul 5, 2017 at 19:05
  • \$\begingroup\$ At first I thought the same but I find it hard to implement in 3D, can you explain how you will go about doing this? \$\endgroup\$ Jul 6, 2017 at 10:58

1 Answer 1

1
\$\begingroup\$

The player is just moving left to right. The player is not moving forward and the camera isn't moving forward either. The scrolling background gives the impression of moving forward.

So to achieve a camera to follow like "Zigzag", well you just don't move your camera at all, but move the level!

\$\endgroup\$
3
  • \$\begingroup\$ It is very easy in 2D to move the level instead of camera but I have no idea how to even start thinking this method in 3D specifically regarding this situation. \$\endgroup\$ Jul 6, 2017 at 11:20
  • \$\begingroup\$ How can I synchronize the player's movement speed with the level's movement speed. \$\endgroup\$ Jul 6, 2017 at 11:33
  • \$\begingroup\$ @DaniyalAzram The player only moves left and right there is no forward/backward motion of the player at all \$\endgroup\$ Jul 11, 2017 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .