- Home /
Using touch as an input for 2d game.
Hi This is just a simple pong tutorial i am expanding on, but i encountered a problem i wanted to learn how to solve in the future. Im fairly new to this all so bear with me please. Currently, I am using 2 player obects. Player01 is moved by pressing W/S Player02 is moved by pressing O/L now this game is meant for phone/tablet, so I thought i needed some controlls for that. My idea is to have to controls displayed like in the picture. At first I didnt think it would be hard, but as im said I'm fairly new to this. My original thought was to check the touch position and create an action based on that. Should I rather go for invisible GUI buttons? Help me please
like this
There is no picture in your post. If you want touch controls you could use two pairs of two buttons that make the paddles go up or down, or you could use raycasting and drag the actual paddles directly with drags.
Your answer