Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

使用 NavigationObstacle

2D 和 3D 版本的 NavigationObstacle 节点分别为 NavigationObstacle2DNavigationObstacle3D

Navigation obstacles are dual purpose in that they can affect both the navigation mesh baking, and the agent avoidance.

  • With affect_navigation_mesh enabled the obstacle will affect navigation mesh when baked.

  • With avoidance_enabled the obstacle will affect avoidance agents.

小技巧

避障默认是启用的。如果障碍物不需要参与避障,请禁用 enabled_avoidance 节省性能。

障碍物与导航网格

导航障碍物对导航网格烘焙的影响

导航障碍物对导航网格烘焙的影响。

烘焙导航网格时,可以用障碍物来丢弃来