If all you want is an eight-directional analog stick, you're good to go! But, if you want the analog stick to float—appear where the players press and disappear when they lift their finger—you have to do a little bit more work.
To make the analog stick appear where the player clicks, complete the following steps:
- First, we need to create an area where the player will click to bring up the analog stick. Right-click Canvas in the hierarchy and select UI | Button to add a Button child to the Canvas. Rename the Button to Click Area.
- Remove the Text child object from the Click Area.
- Stretch the Click Area to fill the whole Canvas.
- Add some padding to the sides of Click Area by changing ...