Moving platforms

Adding moving platforms is much simpler than you think, because 2D Game Kit has prepared two prefabs for us. Both Moving Platform and Moving Platform Long are objects that follow a waypoint system in order to move. They can do this in multiple ways, moving in the following ways:

  •  One-time movement
  •  Cycle
  •  Repetitive back and forth

Now, let's start adding some challenges to our game. Let's create an impossible jump between two platforms. If we don't add a moving platform to this space, the player won't have a chance of getting to the other side of the level. So, by going to Assets | 2D Gamekit | Prefabs | Interactables, I will drag the Moving Platform prefab to the scene or the Hierarchy, and then move it to the right place. ...

Get Hands-On Game Development without Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.