Touchscreen Controls

The Top-down movement behavior allows you to control the player using the arrow keys on the keyboard, but if you're on a tablet, you (probably) won't have a keyboard! To solve that, we'll add virtual keys to the screen.

If you're using a PC and don't intend for your game to be played on a touchscreen, you can skip adding the control buttons, but will need to modify the events in the next section to enable the correct animations.

Control Buttons

Add a new object and select an up arrow. You can use whichever one you prefer.

Continue adding arrows until you have one in each direction.

Drag one instance of each arrow into the scene, and for each arrow...

  1. Change the size to something appropriate (...if required).
  2. Position it like in the following image.