add reset button

This commit is contained in:
CroakFang
2023-03-28 19:57:52 +08:00
parent 1157436d3f
commit e5ccd219f3
2 changed files with 1431 additions and 20 deletions
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -40,6 +40,7 @@ public class CameraOrbit : MonoBehaviour
[Header("Free Camera")]
public GameObject FreeCamSettingsTab;
public Slider FreeCamFovSlider;
public Slider FreeCamRotationSlider;
public Slider FreeCamMoveSpeedSlider;
public Slider FreeCamRotateSpeedSlider;
bool FreeCamLeft = false;
@@ -194,13 +195,12 @@ public class CameraOrbit : MonoBehaviour
lookRotation.y += Input.GetAxis("Mouse X") * rotateSpeed;
lookRotation.x = Mathf.Clamp(lookRotation.x, -90, 90);
transform.localRotation = Quaternion.Euler(lookRotation.x, lookRotation.y, lookRotation.z);
}
else
{
FreeCamLeft = false;
}
transform.localRotation = Quaternion.Euler(lookRotation.x, lookRotation.y, FreeCamRotationSlider.value);
if (Input.GetMouseButtonDown(1) && !eventSystem.IsPointerOverGameObject())
{
@@ -215,6 +215,7 @@ public class CameraOrbit : MonoBehaviour
{
FreeCamRight = false;
}
}
#endregion
}