Fetch left/right tap from new input system

I would like to create a game where you can only move left/right. I’m using the new input system so I just have to define input controls for the A, D, Arrow Left and Arrow Right keys on the keyboard. I’m just expecting a 1D composite, -1 is left and +1 is right.

For mobile devices I don’t want to provide buttons. I want to tap on the left or right side for movement input. When adding the touchscreen as a control scheme and adding a tap action, what is the correct binding path for left/right tapping?

The select box provides so many options, I just want to detect if the player tapped the left or right side and return either -1 or +1.

Which option do I have to select? Thanks in advance :slight_smile:

I’m not expert at mobile but i did a similiar thing so i would get the input from two buttons. You can create 2 buttons, half screen size both. Place one left, one right. When clicked (unity already handle button click with touch) call something like “goleft/goright” or simply change the direction and move inside update. Hope it helps

@Nyxal_Indie thanks for your reply. Yes, this would work, but then I would have to make them invisible and take care for them … I was hoping to find a “ready to use” solution :slight_smile: This should be a basic usecase for mobile games I think