Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Mouse ScrollWheel glitch/bug?

Discussion in 'Linux Editor' started by Satscape, Dec 3, 2018.

  1. Satscape


    Aug 5, 2013
    I'm not sure if this is just the Linux editor or not. In my game the mouse scroll wheel zooms in and out (alters the Camera's field of view). I also have it tied to a couple of keys too.
    When I use the keys in the Unity Editor AND stand-alone, all is well, but if I scroll the mouse wheel in the editor (not stand-alone), I see what looks like frame-rate lag or jerkyness. The frame rates does not drop below 50 though.
    I have this in the .Update()

    zoom -= ( Input.GetAxis ("Mouse ScrollWheel")) * zoomSensitivity;
    zoom = Mathf.Clamp (zoom, zoomMin, zoomMax);

    And to perform the zoom:

    void LateUpdate() {
    GetComponent<Camera>().fieldOfView = Mathf.Lerp (GetComponent<Camera>().fieldOfView, zoom, Time.deltaTime * zoomSpeed);

    IMPORTANT: Even rem'ing out the Mouse ScrollWheel line, still causes the lag inside the editor. It's as if scrolling the mouse wheel and not even reading the value causes this lag, but only inside the Unity Editor.
    In other words, the above code is not running, just the mouse wheel is being scrolled but not read.

    Is this a bug or am I not doing this right?

    Unity 2018.2.18f1 (Ubuntu Linux 18.10)
    Last edited: Dec 4, 2018
  2. Parenthephobia


    Mar 11, 2014
    I have this "lag on scroll wheel" issue in 2018.3.0f2 (and a few previous versions - I didn't note the version when I first noticed it).

    Some observations:
    • It happens when using the scroll wheel in the main editor window, whether or not the mouse pointer is in the scene view.
    • Even when only the scene view or game view is visible, it happens.
    • It doesn't happen when zooming in the scene view with alt-right-mouse-button.
    • It doesn't happen when scrolling on any other window - detached "tabs", the about box.
    Satscape likes this.