統一2D版のルックアット

    ボイドLookAt2D(ターゲットを変換)
    { 
        するVector3 DIR = target.position - transform.position。
        フロート角= Mathf.Atan2(dir.y、サンプルプログラムdir.x)* Mathf.Rad2Deg。
        transform.rotation = Quaternion.AngleAxis(角度、Vector3.forward)。
    }

 X方向の軸ポインティング

おすすめ

転載: www.cnblogs.com/sanyejun/p/11308332.html