using UnityEngine;
public class MyTest : MonoBehaviour
{
public Transform cameraTransform;
public Transform target;
void Update()
{
float angle = Vector3.Angle(cameraTransform.forward, target.position - cameraTransform.position);
Debug.LogError("夹角:" + angle);
}
}