Topic: Disable only the translation of the map

Hello,
as the title suggest I'd like to disable ONLY the translation of the map by left mouse click from "TileSetControl", and let the user just to use to wheel mouse for the zoom.
Is it possible?
Thank-you!

Re: Disable only the translation of the map

Hello.

Add Online Maps Limits component, and limit the coordinates to the map coordinates.

Kind Regards,
Infinity Code Team.

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

Re: Disable only the translation of the map

I should not to limit the map coordinates because actually I'm translating the map by script (that's why I'd like the user not to be able to move the map with mouse).
Is there another way?

Re: Disable only the translation of the map

For example in this way:

using UnityEngine;

public class LockMouseDrag: MonoBehaviour
{
    private OnlineMapsControlBase control;

    private void Start()
    {
        control = OnlineMapsControlBase.instance;
        control.OnMapPress += OnMapPress;
    }

    private void OnMapPress()
    {
        control.OnUpdateAfter += OnUpdateAfter;
    }

    private void OnUpdateAfter()
    {
        control.OnUpdateAfter -= OnUpdateAfter;
        control.isMapDrag = false;
    }
}
Kind Regards,
Infinity Code Team.

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

Re: Disable only the translation of the map

Yes, it work! As always thanks a lot!