SuperAPI AI 工具集

godot-navigation-pathfinding

通用与其它

查看项目

更新于 10-15 21:05

技能介绍

用途:为 Godot 项目提供 AI 寻路与导航的实现蓝图,适用于塔防、RTS、潜行等需要单位移动、追击、巡逻与群体避障的场景。

主要能力:围绕 NavigationAgent2D/3D 与 NavigationServer 组织实践,涵盖异步动态烘焙、卡住检测与恢复、服务端 RVO 避障、动态导航网格更新、无节点 RID 地图/区域、路径查询对象复用、地形 enter_cost/travel_cost、动态障碍、NavigationLink(跳跃/传送/电梯)、多层导航(走/飞/游)、编队偏移与生产级 Agent 封装。

必要用法与关键约束:不要在 _ready() 中直接设置 target_position,需 call_deferred() 后 await get_tree().physics_frame;运行时避免同步 bake_navigation_polygon(),改用 NavigationServer.bake_from_source_geometry_data_async();调用 get_next_path_position() 前检查 is_navigation_finished();启用 avoidance_enabled 时必须设置 radius;追击目标不要每帧重设 target_position,建议按约 0.2 秒定时或距离阈值重定向;不要假设路径一定存在,需检查可达性;大量简单实体应使用 NavigationServer RID 而非逐节点;避免每帧 get_path(),改用 query_path() 并复用结果对象;高代价区域应设置 enter_cost;使用 agent_set_avoidance_callback 计算安全速度。

脚本选择:按需求选用 async_dynamic_baking.gd、agent_stuck_detection.gd、low_level_avoidance.gd、dynamic_nav_manager.gd、server_navigation_setup.gd、memory_optimized_queries.gd、terrain_cost_manager.gd、moving_obstacle_server.gd、nav_link_traversal.gd、layer_mask_navigation.gd、group_avoidance_formations.gd、crowd_agent_3d.gd、nav_mesh_carver_3d.gd、navmesh_profiler.gd、smart_navigation_agent.gd。

限制:首次 NavigationRegion 烘焙的 UI 引导建议参考官方文档;具体 API 细节需按需查阅官方链接。资料未提供收费、价格与平台信息。