2015-11-26から1日間の記事一覧
目次 分かったこと1・「NavMeshPath」は「NavMeshAgent」の中にある 分かったこと2・「NavMeshPath.corner」の扱いとVector3の使い方 分かったこと3・「NavMeshAgent.destination」を設定してもすぐには「NavMeshPath.corner」は作られない 分かったこと…
C#のプレイヤー側のスクリプト名を「Player」、 別のオブジェクト側のスクリプト名を「Cursor」とし、 「Player」側で下記のプログラムを書いて、 direction = (GameObject)Resources.Load ("Prefabs/Cursor");GameObject cursor = (GameObject)Instantiate …
public GameObject player; private NavMeshAgent agent; void Start () { player = GameObject.Find("Player"); agent = GetComponent<NavMeshAgent>(); } void Update () { Vector3 forward = transform.TransformDirection(Vector3.forward); Vector3 targetDirection =</navmeshagent>…