godot-navigation-pathfinding

Implement AI pathfinding and dynamic obstacle avoidance in Godot 4.

488|36|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-navigation-pathfinding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: godot-navigation-pathfinding
Source: https://github.com/thedivergentai/gd-agentic-skills/tree/main/skills/godot-navigation-pathfinding
Command: npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-navigation-pathfinding

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides robust AI pathfinding solutions for Godot 4, enabling characters and entities to navigate complex game environments intelligently, including obstacle avoidance and dynamic path adjustments.

Core Features & Use Cases

  • AI Pathfinding: Implement efficient movement for enemies, NPCs, or any game entity using NavigationAgent2D/3D.
  • Obstacle Avoidance: Ensure agents can dynamically avoid each other and moving obstacles.
  • Dynamic Navigation: Update navigation meshes at runtime for moving platforms or changing environments.
  • Use Case: In a real-time strategy game, use this skill to guide units around terrain, other units, and dynamically appearing obstacles to reach their target destination.

Quick Start

Use the godot-navigation-pathfinding skill to set the target position for the NavigationAgent2D to the player's current global position.

Frequently Asked Questions about godot-navigation-pathfinding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement AI pathfinding in Godot 4 for NPCs and enemies?

AI pathfinding in Godot 4 is implemented using NavigationAgent2D or NavigationAgent3D. You set the agent's target position to the desired destination, and the NavigationServer calculates the path for your game entities.

How do I set up dynamic obstacle avoidance for agents in Godot?

Dynamic obstacle avoidance in Godot uses NavigationServer to process agent proximity. NavigationAgent2D and 3D support agent-specific avoidance tuning, allowing entities to dynamically steer around each other and moving obstacles.

Can I update the navigation mesh at runtime in Godot for moving platforms?

Runtime navigation mesh updates are supported in Godot 4. You can dynamically update navigation meshes to accommodate changing environments, moving platforms, or dynamically appearing obstacles during gameplay.

Does this Godot pathfinding approach work for real-time strategy and tower defense games?

This Godot pathfinding approach suits real-time strategy, tower defense, and stealth games. It efficiently guides multiple units around terrain, other units, and dynamic obstacles to reach their target destinations.

Why do my NavigationAgent2D units overlap instead of avoiding each other in Godot?

Units overlapping indicates avoidance tuning needs adjustment on the NavigationAgent2D. You must configure agent-specific avoidance properties in the NavigationServer to ensure entities dynamically steer around each other.