Mobile touchscreens make platforming notoriously tricky. For DreamLoop, we wanted a hybrid layout: physical left/right arrows and a jump button on the screen, but direct tapping on interactive objects like clocks and lights. Using Unity 6's new Input System, we isolated player movement from touch raycasts. If you tap an empty space, the player won't walk there; you must use the buttons. When gravity flips, the player controls swap smoothly to keep left-moving as left even on the ceiling.
To implement this, our PlayerController2D listens to events triggered by on-screen DirectionButton UI components. In the Unity editor, we map keyboard inputs (WASD / Arrow Keys) directly to the same actions, which makes rapid testing fast and comfortable for the development team. Our decision to enforce buttons rather than tap-to-walk is key to maintaining a tight, responsive feel in puzzle-platform elements.