← Yop2D

How to make a moving platform?

Beginner guide · no code

Français · English · Español · Deutsch · Italiano · Português · Русский · 中文 · 日本語 · العربية

ℹ️ For Yop2D Next, the new 2D + 3D version of Yop2D (coming soon). Button and node names are those of Yop2D Next.

🔍 How do I…? All short recipes, with a search

A platform that goes back and forth on its own. The hero can jump on it: it carries it. The Elevator (back and forth) behaviour does everything.

You need:

Step 1: the ground

  1. Put an object in the scene (an image or a Square) and name it sol.
  2. Stretch it so it covers the whole width of the screen.
  3. Select sol, tap ⚙ Object behavior in the Inspector and choose Ground / wall.

Step 2: the hero

  1. Put an object in the scene (an image or a Square) and name it heros.
  2. Select heros, tap ⚙ Object behavior in the Inspector and choose Platform character.
  3. Tap Object → Interactive → Joystick.

Step 3: the platform

  1. Put an object in the scene (an image or a Square) and name it plateforme.
  2. Select plateforme, tap ⚙ Object behavior in the Inspector and choose Elevator (back and forth).
  3. It starts going line: choose right (or up for a lift). Distance line: choose how far it goes.

The nodes

No node needed: the behaviour does everything.

Try it

Tap Play: the platform goes back and forth. Jump on it: it carries you.

👉 The platform can also wait for the hero to step on before it leaves: look at the other lines of the same window.