public void OnDrag(PointerEventData eventData) { if (eventData.button == PointerEventData.InputButton.Left) { var delta = PreviousPanPosition - (Vector3)Util.Util.MouseWorldCoordinates; CameraAdjust.Pan(delta); CameraAdjust.Clamp(); } }
// Update is called once per frame private void Update() { if (!Frozen) { var scrollDelta = Input.GetAxis("Mouse ScrollWheel"); if (scrollDelta != 0) { CameraAdjust.Zoom(scrollDelta, Util.Util.MouseWorldCoordinates); CameraAdjust.Clamp(); } } }