淘先锋技术网

首页 1 2 3 4 5 6 7
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);
    }
}