using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class cameraMove : MonoBehaviour
{
public enum RotationAxes
{
MouseXAndY = 0,
MouseX = 1,
MouseY = 2
}
public RotationAxes m_axes = RotationAxes.MouseXAndY;
public float m_sensitivityX = 10f;
public float m_sensitivityY = 10f;
public bool CanMove = false;
// 水平方向的 镜头转向
public float m_minimumX = -360f;
public float m_maximumX = 360f;
// 垂直方向的 镜头转向 (这里给个限度 最大仰角为45°)
Unity 鼠标滚轮缩放 拖动移动视角
最新推荐文章于 2024-06-14 18:30:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)