using System.Collections; using System.Collections.Generic; using UnityEngine; public class WindVaneCom : MonoBehaviour { public static WindVaneCom instance { get; private set; } public bool isOn = false; public Camera cam; public GameObject T; publi…
固定相机跟随 这种相机有一个参考对象,它会保持与该参考对象固定的位置,跟随改参考对象发生移动 using UnityEngine; using System.Collections; public class CameraFlow : MonoBehaviour { public Transform target; private Vector3 offset; // Use this for initialization void Start() { offset = target.posit…
1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 public class MoveCamera : MonoBehaviour 5 { 6 public float distance = 10.0f;//目标物体与摄像机之间在世界坐标基础上保持水平上的距离 7 public float height = 5.0f;//摄像机与目标物体之间的高度差 8 public flo…