Overview

This tutorial covers the fundamentals for effective interactions with platforms and other game entities for a 2D sidescroller game in Unity. You'll learn how to create a moving platform and interactive items for the player.

<aside> 💡

For this tutorial you need some sort of movement for the player.

The final state of the Platform Generation & Layout - 2D Game and Platformer 2D Player Object tutorials is used as a base.

Alternatively, download the project in its final state combining the tutorial above here:

</aside>


Deep-diving & How To…?

This tutorial breaks down to these topics:

Moving Platform

A moving platform is a ground area that moves between specific points.

Platform visuals

To make a moving platform, we first need a platform object.

<aside> 💡

Enabling grid and snapping might ease your work on matching distances between scene assets.

image.png

</aside>

Let’s begin with a new 2D Square sprite. Name it as you’d like.

image.png

Notice that, if you have enabled the grid, your new square fits perfectly in a grid slot:

20250508-1909-27.8801933.mp4

This platform will be the size of 2 or 3 tiles. As each tile is 1x1 units, our platform needs scaling in the X axis (red arrow).

Scaling the X axis from 1 to 3

Scaling the X axis from 1 to 3

image.png