private void HandleScoutInput() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (NewGameChoices.ChosenLocation == null && Physics.Raycast(ray, out hit)) { hoverLocation = new BaseLocation() { Region = GeoExtensions.ParseRegion(hit.collider.name), LatLong = LatLong.FromPointOnUnitSphere(ScoutView.ScoutOrreyHorizontal.transform.InverseTransformPoint(hit.point)) }; ScoutView.FillScoutInfo(hoverLocation.Region, hoverLocation.LatLong); ScoutView.ScoutCursor.position = hit.point; ScoutView.ScoutCursor.rotation = Quaternion.LookRotation(hit.normal); } if (Input.GetMouseButtonDown(0)) { SetSelectedLocation(hoverLocation); } else if (Input.GetMouseButtonDown(1)) { SetSelectedLocation(null); } else { float xDelta = CrossPlatformInputManager.GetAxis("Horizontal"); float yDelta = CrossPlatformInputManager.GetAxis("Vertical"); if (xDelta != 0f) { ScoutView.ScoutOrreyHorizontal.transform.Rotate(Vector3.up, xDelta, Space.Self); } if (yDelta != 0f) { ScoutView.ScoutOrreyVertical.transform.Rotate(Vector3.forward, -yDelta, Space.Self); } } }