0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Unity]NavMesh導入

Last updated at Posted at 2021-12-15

地点Aから地点Bまで移動させたいオブジェクト。
NavMeshを使って実現するには。
(基本使うだけなら簡単)

NavMesh基本要素

  • NavMesh
    • NavMesh Agent
    • NavMesh Obstacle
    • Off-Mesh Link
  1. 地面と、移動させたいオブジェクト(以下NPC)と、目的地を作る。
  2. 地面にNavMeshをBakeする(後述)。
  3. NPCにNavMesh Agentを追加
  4. スクリプトによりNavMesh Agentに目的地を設定する。

NavMeshのBake

  1. Window→AI→Navigation
  2. 地面と障害物を設定 -> Navigation satic
  3. 適宜パラメータ設定
    1. 主(障害物との距離、トンネルみたいに潜り抜けられる所の高さ、移動可能な段差、移動可能な斜面角度)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?