Godot Navigation | Subtracting Collision Shapes from Navigation Polygons

Опубликовано: 11 Март 2026
на канале: Game Development Center
12,451
269

In this Godot Tutorial, I will teach you how you can make pathing through the use of the Godot Navigation2D node smoother by subtracting any collision shape from the navigation polygon, thereby avoiding the collision objects altogether.

00:00 Intro
00:15 Introduction
03:06 Subtracting StaticBody Collision Shapes
08:41 Subtracting TileMap Collision Shapes
19:46 Limitations of this Solution
22:43 A Bright Future in Godot 4.0

The solution in this tutorial is not perfect as you can't remove outlines that share vertice locations. For a perfect solution, we will have to wait for the NavigationServer that will be introduced in Godot 4.0.

If you want to learn more about the tilemap functions used or learn about changing tiles at runtime/making tile interactive:    • Godot Tilemap | Interactive Tiles + Change...  

Navigation2D tutorial from GDQuest:    • Pathfinding on a TileMap with Navigation2D...  

⬧⬧⬧⬧⬧ GDC TUTORIALS ⬧⬧⬧⬧⬧
I believe educational material should be available to all, for free
Support this vision by joining the GDC-Club and get perks in return
   / gamedevelopmentcenter  
  / gamedevelopmentcenter  

⬧⬧⬧⬧⬧ LEARN MORE GAMEDEV ⬧⬧⬧⬧⬧
These books have helped me in my game design and programming, I whole fully recommend them to you!
Level Up! The Guide to Great Video Game Design ►► https://amzn.to/3hIg6dE
Game Programming Patterns ►► https://amzn.to/35IoDsH
The Art of Game Design: A Book of Lenses ►► https://amzn.to/35MSHoU

⬧⬧⬧⬧⬧ LIVESTREAMS ⬧⬧⬧⬧⬧
I Livestream game development twice a week right here on YouTube.
Subscribe and hit that Bell Icon to make sure you don't miss it!
https://www.youtube.com/c/GameDevelop...

Tuesday and Thursday
1900 to 2200 (GMT+1/2 (winter/summertime), that's;
1200 to 1500 (PST), or
1500 to 1800 (EST).

⬧⬧⬧⬧⬧ COMMUNITY & SOCIAL ⬧⬧⬧⬧⬧
Join the community! Follow me on Social!
DISCORD ►►   / discord  
TWITTER ►►   / gamedevstefan  

⬧⬧⬧⬧⬧ ABOUT GDC ⬧⬧⬧⬧⬧
GDC, Game Development Center, was created to provide in-depth tutorials on game design theory and game development using the Godot Game Engine. I aim for multi-part Godot tutorials, allowing me to dive deeper into Godot's features.

⬧⬧⬧⬧⬧ ASSETS USED ⬧⬧⬧⬧⬧
https://opengameart.org/content/grass...
http://remusprites.carbonmade.com
https://opengameart.org/content/wereb...

⬧⬧⬧⬧⬧ DISCLAIMER ⬧⬧⬧⬧⬧
Some of these links go to one of my websites and some are affiliate links where I'll earn a small commission if you make a purchase at no additional cost or disadvantage to you. You will receive the same price and service.