using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FreeCamera : MonoBehaviour
{
[SerializeField]
private Transform m_Pivot;
[SerializeField]
private Transform m_Camera;
public float m_TurnSpeed = 1.5f;
private float m_LookAngle;
private float m_TiltAngle;
[SerializeField]
private float m_TurnSmoothing = 0.0f; // How much smoothing to apply to the turn input, to reduce mouse-turn jerkiness
[SerializeField]
private float m_TiltMax = 75f; // The maximum value of the x axis rotation of the pivot.
[SerializeField]
private float m_TiltMin = 45f; // The minimum value of the x axis rotation of the pivot.
private Vector3 m_PivotEulers;
private Quaternion m_PivotTargetRot;
private Quaternion m_TransformTargetRot;
private float MoveSpeed = 0;
// Use this for initialization
void Start()
UNITY 视角像scence窗口得摄像机一样自由移动
最新推荐文章于 2024-07-24 13:29:35 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)