Search Issue Tracker

Fixed in 2021.1

Votes

0

Found in

2019.4

2019.4.3f1

2020.1

2020.2

Issue ID

1264545

Regression

No

[WebGL] [Input System] Scrolling with mouse wheel is much slower on WebGL builds when using New Input System package

WebGL

-

Reproduction steps:
1. Open the attached project ("MouseScroll")
2. Open the repro scene ("SampleScene")
3. Enter Play Mode and try using scroll wheel
4. Exit Play Mode
5. Switch build target to WebGL
6. Make a build and run it
7. Try using the scroll wheel on the Scroll View

Expected result: WebGL scroll speed matches the scroll speed in the Editor
Actual result: WebGL scroll speed is significantly slower (almost immovable)

Reproducible with: 2019.4.5f1, 2020.1.0f1, 2020.2.0a19
Couldn't test with: 2018.4 (Input System package is not supported)
Reproducible with package versions 0.2.10-preview, 1.0.0

Notes:
1. The issue does not reproduce when using the old input system
2. The issue does not reproduce on Standalone builds (both Mono and IL2CPP)

  1. Response avatar

    Resolution Note (fix version 2021.1):

    WebGL mouse wheel deltas have update to how the new input system expects them.
    Fixed in 2021.1.0a1

Comments (1)

  1. D5397aa958330fe0f8fb09298f9225db?d=mm

    polbrich_mipumi

    Nov 24, 2020 12:16

    Since sadly an upgrade to 2021 is currently not possible to us and there seems to be no intention to include the fix into 2019.4 LTS (!sic), here is a Input Action processor that can be used to work around the issue:

    #if UNITY_EDITOR
    [InitializeOnLoad]
    #endif
    public class WebGLScrollProcessor : InputProcessor<Vector2>
    {
    #if UNITY_EDITOR
    static WebGLScrollProcessor()
    {
    Initialize();
    }
    #endif

    [RuntimeInitializeOnLoadMethod]
    static void Initialize()
    {
    InputSystem.RegisterProcessor<WebGLScrollProcessor>();
    }

    [Tooltip("ScrollValue replacement for incoming Scroll Vector.")]
    public float scrollValue = 120f;

    public override Vector2 Process(Vector2 value, InputControl control)
    {
    if (value.y > 0)
    {
    value.y = scrollValue;
    }
    if (value.y < 0)
    {
    value.y = -scrollValue;
    }
    return value;
    }
    }

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.