Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2019.4.X, 2020.3.X

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. 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

  2. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.21f1

Comments (2)

  1. doron-matific1

    May 09, 2023 11:00

    This was closed a long time ago, but we're still experiencing this behavior.

  2. 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.