add standalone mode ,bug fix

This commit is contained in:
CroakFang
2023-02-13 10:38:40 +08:00
parent 7ba9b84a11
commit f11edb5924
46 changed files with 3599 additions and 34 deletions
+6 -1
View File
@@ -131,7 +131,6 @@ public class CameraOrbit : MonoBehaviour
if (Input.GetMouseButton(0) && controlOn)
{
position -= Input.GetAxis("Mouse X") * transform.right * OrbitCamSpeedSlider.value;
OrbitCamZoomSlider.value -= Input.mouseScrollDelta.y * OrbitCamZoomSpeedSlider.value;
OrbitCamHeightSlider.value -= Input.GetAxis("Mouse Y") * OrbitCamSpeedSlider.value;
}
else
@@ -139,6 +138,11 @@ public class CameraOrbit : MonoBehaviour
controlOn = false;
}
if (!eventSystem.IsPointerOverGameObject())
{
OrbitCamZoomSlider.value -= Input.mouseScrollDelta.y * OrbitCamZoomSpeedSlider.value;
}
if ((Input.GetMouseButtonDown(2) || Input.GetKeyDown(KeyCode.LeftControl)) && !eventSystem.IsPointerOverGameObject())
{
CameraTargetHelper.SetActive(true);
@@ -153,6 +157,7 @@ public class CameraOrbit : MonoBehaviour
CameraTargetHelper.SetActive(false);
}
float camDist = OrbitCamZoomSlider.value;
OrbitCamHeightSlider.maxValue = camDist + 1 - camDist * 0.2f;
OrbitCamHeightSlider.minValue = -camDist + 1 + camDist * 0.2f;