add Physics support

This commit is contained in:
1605296300@qq.com
2022-08-10 16:54:20 +08:00
parent 33c8d35c84
commit f797fbb2fd
855 changed files with 649609 additions and 98 deletions
+2 -2
View File
@@ -124,11 +124,11 @@ public class CameraOrbit : MonoBehaviour
Camera.main.fieldOfView = OrbitCamFovSlider.value;
Vector3 position = transform.position;
if (Input.GetMouseButtonDown(0) && !eventSystem.IsPointerOverGameObject())
if (Input.GetMouseButtonDown(2) && !eventSystem.IsPointerOverGameObject())
{
controlOn = true;
}
if (Input.GetMouseButton(0) && controlOn)
if (Input.GetMouseButton(2) && controlOn)
{
position -= Input.GetAxis("Mouse X") * transform.right * OrbitCamSpeedSlider.value;
OrbitCamZoomSlider.value -= Input.mouseScrollDelta.y * OrbitCamZoomSpeedSlider.value;