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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[BUG] Unity 2020.3LTS -Incorrect Pen mapping to Mouse input, also breaking native UI elements

Discussion in 'Windows' started by fcloss, Jun 10, 2022.

  1. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Hi,

    After more than 10 years using it, now the Input Manager incorrectly maps Pen (either laptops with Pen (like Asus Vivobook) or USB Pens, like Wacom Intuos) input to mouse input properties (mousePosition, GetMouseButtonDown, GetMouseButton).

    How it worked (and should work):

    * Pen reaches screen or tablet (wacom usb): Input.GetMouseButtonDown(0) = true
    * While pen is touching screen or tablet: Input.GetMouseButtonDown(0) = false; Input.GetMouseButton(0) = true, position on screen using Input.mousePosition is updated every frame according to movement;

    How it is now (incorrect): (using Unity 2020.3.33f1)

    * Pen reaches screen or tablet (wacom usb): Input.GetMouseButtonDown(0) = true (ok)
    * While pen is touching screen or tablet: Input.GetMouseButtonDown(0) = true (*incorrect), Input.GetMouseButton(0) = false (incorrect), position not updated (*incorrect), value is always the initial position.

    Result is that pen is not working anymore in my app, which includes drag & drop, drawing, drag for 3D navigation, etc.

    Please, converting it to Input System is not an option as I use compiled plugins that relies on Input Manager. In my opinion this is a bug that does not follow the input logic and that breaks retro-compatibility.

    OTHER ERRORS (that happen also with Input System):
    Not working UI elements: ScrollRect, DraggableScrollItem, etc
    (check attached gif of scroll rect with mouse and then with pen)

    Unity UI relies on Input Manager and uses mousePosition for input position, so it also does not work with Pen anymore.




    It seems that anything that relies on position does not work anymore.

    Bug Report filed: CASE IN-6437

    Thanks in advance,
    Fernando
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Thanks for the report, that indeed sounds unintended.
     
  3. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Great. Thanks.
     
  4. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Hi @Tautvydas-Zilys, do you have any update on this? Nothing has changed on my bug report status.

    Thanks
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Sorry I've been out on vacation... I've pinged QA folks and asked them what's going on with it. I'll get back to you once I hear back.
     
  6. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191
    Thank you! Hope you had a good time on your vacation.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    I've been told a QA engineer is actively looking at your reported bug today.
     
  8. fcloss

    fcloss

    Joined:
    Dec 1, 2011
    Posts:
    191