简体   繁体   English

如何在 Unity 中激活 NavMesh?

[英]How do I activate NavMesh in Unity?

I'm making a car type game, and wanted to use NavMesh to "control" my car.我正在制作一款汽车类游戏,并想使用 NavMesh 来“控制”我的汽车。

I was wondering how exactly to activate it, as I can't find a straightforward answer anywhere else.我想知道如何确切地激活它,因为我在其他任何地方都找不到直接的答案。

Its something like this它是这样的

  1. You add Navmesh agent to the player that will move on the Navmesh.您将 Navmesh 代理添加到将在 Navmesh 上移动的玩家。
  2. Add Navmesh obstacles.添加导航网格障碍。
  3. Generate Navmesh and use script to set destination of the agent to move it.生成 Navmesh 并使用脚本设置代理的目标以移动它。

This tutorial might be helpful to you.教程可能对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM