ℹ️ 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 joystick to walk and a button to jump, set in the behaviour window, without any node.
You need:
- a 2D project open in Yop2D Next.
Step 1: the ground
- Put an object in the scene (an image or a Square) and name it sol.
- Stretch it so it covers the whole width of the screen.
- Select sol, tap ⚙ Object behavior in the Inspector and choose Ground / wall.
Step 2: the hero
- Put an object in the scene (an image or a Square) and name it heros.
- Select heros, tap ⚙ Object behavior in the Inspector and choose Platform character.
Step 3: the controls
- Tap Object → Interactive → Joystick.
- Tap Object → Interactive → Button with text.
- Name it saut and type Jump in its Text line.
Step 4: the setting
- Select heros and open ⚙ Object behavior again.
- Controls line: Joystick. Jump button line: choose saut.
The nodes
No node needed: the behaviour does everything.
Try it
Tap Play: the joystick makes the hero walk, the Jump button makes it jump.
👉 No button: push the joystick up to jump.