Heres the code for anyone interested. Just use a canvas set to world space, a orthographic camera and a map UI texture.
void Start ()
{
SetZoom(117.41f);
}
void Update ()
{
MapCam.orthographicSize = Mathf.Clamp(MapCam.orthographicSize - (Input.GetAxis("Mouse ScrollWheel") != 0 ? Mathf.Sign(Input.GetAxis("Mouse ScrollWheel")) : 0), minZoom, maxZoom);
}
void SetZoom(float zoomLevel)
{
MapCam.orthographicSize = zoomLevel;
}
}
If you liked this video consider subscribing for regular video updates and liking the video.
Feel free to contact us at [email protected] if you'd like to see anything related to a video game or gaming in general.
We are on Twitter at http://www.twitter.com/
Facebook at http://www.facebook.com/
If you disliked this video for some reason, don't just thumbs down and leave. Instead please leave a comment telling us what we can improve on in the future so that we can continually improve our videos based on your community input.