标签:好的 for position ali -- red bsp zed jmh
代码实现:
//方向
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;
标签:好的 for position ali -- red bsp zed jmh
原文地址:https://www.cnblogs.com/hyhy904/p/11304683.html