Expert blueprint for AI pathfinding (tower defense, RTS, stealth) using NavigationAgent2D/3D, NavigationServer, avoidance, and dynamic navigation mesh generation.
Expert blueprint for AI pathfinding (tower defense, RTS, stealth) using NavigationAgent2D/3D, NavigationServer, avoidance, and dynamic navigation mesh generation.
Use when implementing enemy AI, NPC movement, or obstacle avoidance.
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Claude CodeNot declared
CursorNot declared
CodexNot declared
GitHub CopilotNot declared
WindsurfNot declared
Gemini CLINot declared
ClineNot declared
OpenCodeNot declared
Repository health
Stars678
LicenseLICENSE
Default branchmain
Open issues0
Status
Active
Package contents
Files included with this skill beyond the listing page.
skill mdSKILL.md12,896 B
docsSUMMARY.md385 B
History
First seen on skills.sh
First recorded snapshot · 298 installs
SKILL.md
NEVER Do in Navigation & Pathfinding
NEVER set targetposition before awaiting physics frame — NavigationServer not ready in ready()? Path fails silently. MUST calldeferred() then await gettree().physics_frame.
NEVER use NavigationRegion2D.bakenavigationpolygon() at runtime — Synchronous baking freezes game for 100+ ms. Use NavigationServer.bakefromsourcegeometrydata_async() for stutter-free updates.
NEVER forget to check isnavigationfinished() — Calling getnextpath_position() after reaching target = stale path, AI walks to old position.
NEVER use avoidanceenabled without setting radius — Default radius = 0, agent passes through others. Set navagent.radius = collision_shape.radius for proper avoidance.
NEVER poll target_position every frame for chase AI — Setting target 60x/sec = path recalculation spam. Use timer (0.2s intervals) or distance threshold for updates.
NEVER assume path exists — Target unreachable (blocked by walls)? getnextpathposition() returns invalid. Check istarget_reachable() or validate path length.
NEVER use heavy node-based navigation for thousands of simple entities — Use NavigationServer3D/2D RIDs directly to bypass node overhead.
NEVER call getpath() every frame — Use querypath() with reused NavigationPathQueryResult objects to prevent massive heap allocation and GC pressure.
NEVER leave 'enter_cost' at 0 for high-penalty areas — Use costs to make AI prefer logical paths (roads over water) instead of just shortest geometric distance.
NEVER ignore agentsetavoidance_callback — Always use the callback for safe velocity computation to avoid synchronization issues and "jittery" movement.
Decision Tree → Scripts
MANDATORY for the chosen path. Do NOT Load editor-intro / Official Docs bootstrap recipes from this skill body (use Reference links when you need first-time region setup).
Prefer Official Docs intros for first NavigationRegion bake UI; this skill owns async bake, server RVO, costs, and stuck recovery.
Thousands of simple agents → RID server path ([servernavigationsetup.gd](scripts/servernavigationsetup.gd) + [lowlevelavoidance.gd](scripts/lowlevelavoidance.gd)), not one NavigationAgent node each.
Server RVO crowds, projected carving, bake benchmarks → [expert-nav-architectures.md](references/expert-nav-architectures.md)
Reference
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing work to a peer domain — do not preload the whole lattice.