2017-12-20 6 views
1

私はNavmeshagentから私の移動のために私のgameobjectsを使用します。 しかし、彼らは非常にゆっくりと動きます。 navmeshagentをスピードアップする方法

は、私はこのようになりnavmeshagent.speed設定:

Game_Controller.Database [source_index_i, source_index_j].Nute_M.GetComponent<NavMeshAgent>().speed = 5000000000; 

しかし、彼らはまだ非常にゆっくりと動いています。ユニティで物事をもっと速くする他の方法はありますか?

答えて

1

速度プロパティは、エージェントが移動する最大速度を指定します。あなたは加速プロパティを変更していないので、瞬間的な結果が表示されません。

ので、この操作を行います。

Game_Controller.Database [source_index_i, source_index_j].Nute_M.GetComponent<NavMeshAgent>().speed = 10; 

ドキュメント:https://docs.unity3d.com/560/Documentation/Manual/class-NavMeshAgent.html

Game_Controller.Database [source_index_i, source_index_j].Nute_M.GetComponent<NavMeshAgent>().acceleration= 5000000000; 

は、次に、必要なしかし、あなたの速度のプロパティを設定します
関連する問題