Search Unity

Unity registeres 1 extra touch

Discussion in '2D' started by sirswagon, Feb 14, 2020.

  1. sirswagon

    sirswagon

    Joined:
    Jun 11, 2019
    Posts:
    4
    I'm coding on a laptop with touchscreen. In my last tests everything worked fine with the touchscreen,
    butt all of a sudden Unity ALWAYS registeres one extra touch!! (Input.touchCount is always 1 more than it should be).

    I moved the Unity Window over the whole screen but it didn't matter, the one extra touch exists everywhere!

    Since I can't find anything on the internet, can someone please help me? Thanks in regard
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    Try using Input.GetTouch to get a Touch struct, which will tell you more about the touches:
    https://docs.unity3d.com/ScriptReference/Touch.html

    Looking at the returned info may be insightful to why you're seeing that, or if there's a bogus touch being registered. See if the positions are the same, if they're in the same phase, if they both appear at the same time, etc. etc.