Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Second touch counts as mouse press - bug?

Discussion in 'Windows' started by SoftwareGeezers, Sep 25, 2017.

  1. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    This code fires when using a touch screen and a second finger is pressed:

    Code (CSharp):
    1.                 if(Input.GetMouseButton(1)){
    2.                     print("mouse 1");
    3.                 }
    Is this just a bug, or is there a setting I can adjust? This is Unity 5.6.1.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    You probably have Input.simulateMouseWithTouches set to true, then mouse events are generated for touches, where two finger count as right-click.
     
  3. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    That's fixed it. Thanks!