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);
}
}
Unity 相机朝向与目标之间的夹角
猜你喜欢
转载自blog.csdn.net/a0_67/article/details/131601146
今日推荐
周排行