Topic: Slow down zoom when using scrollwheel

I have an app using OnlineMaps and users on laptops with a touchpad continuously complain that zooming is too sensitive.  When using a mouse, a single scroll "click" seems to change the zoom by 1 unit, which I suspect is the reason for the complaints.

Is there a way to make it so a single mouse scroll will zoom in/out less than 1 unit?  I have tried adjusting the TileSet zoomSensitivity, and/or OnlineMapsControlBase.instance.zoomSensitivity but nothing seems to change the one unit step when wheel scrolling.

Would appreciate any guidance.

Re: Slow down zoom when using scrollwheel

Hello.

Honestly this is the first time I've heard of this problem.
In any case, you can slow down zoom change using the wheel in this way:

using UnityEngine;

public class SlowDownWheelZoom : MonoBehaviour
{
    public OnlineMaps map;
    public float zoomScale = 0.5f;
    
    private void Start()
    {
        if (map == null) map = OnlineMaps.instance;
        map.control.OnValidateZoom += OnValidateZoom;
    }

    private bool OnValidateZoom(OnlineMapsZoomEvent zoomEvent, float value)
    {
        if (zoomEvent != OnlineMapsZoomEvent.wheel) return true;
        
        float z = map.floatZoom;
        float delta = (z - value) * zoomScale;
        
        if (map.control.zoomMode == OnlineMapsZoomMode.center) map.floatZoom = z + delta;
        else map.control.ZoomOnPoint(delta, map.control.GetInputPosition());
        
        return false;
    }
}

P.S. This way will conflict with SmoothZoomOnMouseEvents script.
If you want to use SmoothZoomOnMouseEvents, you need to modify it and add zoomScale.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.