API:Vector3 Vector2=vector1.normalized;
2021-05-20 14:30
标签:好的 for position ali -- red bsp zed jmh 代码实现: //方向 API:Vector3 Vector2=vector1.normalized; 标签:好的 for position ali -- red bsp zed jmh 原文地址:https://www.cnblogs.com/hyhy904/p/11304683.html
void Demo02(http://www.amjmh.com/v/BIBRGZ_558768/)
{
Vector3 pos = this.transform.position;
Debug.DrawLine(Vector3.zero, this.transform.position);
//数学公式
Vector3 dir1 = pos / pos.magnitude;
//UnityAPI 封装好的方法
Vector3 dir2 = pos.normalized;
Debug.DrawLine(Vector3.zero,dir1,Color.red);
}
---------------------
文章标题:API:Vector3 Vector2=vector1.normalized;
文章链接:http://soscw.com/index.php/essay/87914.html