Search Unity

  1. Unity 2018.3 is now released.
    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. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    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