| 12345678910111213141516171819 |
- using System;
- using UnityEngine;
- /* 弓的摄像机总会LookAt该节点的Point子节点
- 九轴数据是直接应用到该节点的(特意分离而不直接应用到弓的摄像机) 是为了避免z轴旋转
- */
- public class CameraToLook : MonoBehaviour
- {
- [NonSerialized] public Transform point;
- public static CameraToLook ins;
- void Awake()
- {
- ins = this;
- point = transform.Find("Point");
- }
- void OnDestroy()
- {
- if (ins == this) ins = null;
- }
- }
|