Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question New Input System, Multi-Touch behaving oddly

Discussion in 'Input System' started by ExNull-Tyelor, Jun 1, 2023.

  1. ExNull-Tyelor


    Apr 21, 2022
    We're using the new Unity Input system for our game's controls, and we've gotten reports from multiple users that tapping rapidly on the left and right sides of the screen will sometimes cause the game to register a swipe instead of a tap.

    I assume this means that the "canceled" callback for our touch InputAction isn't being called, so the second tap is causing the input controller to think that the second tap is actually the first tap, but moved (i.e. swiped) to the other side of the screen.

    If the player doesn't tap extremely rapidly, this bug doesn't ever actually occur. It's only when tapping back and forth very VERY rapidly that this seems to break.

    I guess my question is if this is a fault with the new Unity Input System?

    The only solution I can really think of to fix this would be doing some kind of distance check between the touch points and determining it must be the second touch if its more than like half the screen width away from the first touch. But that just feels like a hacky, and quite edge-case prone solution.

    Ideally the new Input System I'd hope would just be smart enough to maintain order of the touches/fingers, even if the player is tapping extremely rapidly back and forth between two sides of the screen, but this doesn't seem to be the case based on our experience so far...
    Last edited: Jun 6, 2023