Member-only story
Implementing 2D point-and-click navigation (Godot 4/C#)
Let’s see how to use Godot’s built-in nav utilities to move a unit through a field of asteroids!

Moving the player’s avatar or AI units in your game level can sometimes seem difficult, especially when there are a bunch of walls and obstacles everywhere the characters need to avoid.
Luckily, in Godot, navigating in a scene in an intelligent way is really easy — so, today, let’s explore how this works by setting up a simple 2D point-and-click nav system :)
By the end of this video, you’ll know how to get a mouse-clicked position on the screen, and how to have a unit navigate to this spot in a clever way, while avoiding the obstacles on the way:

As usual, since we’ll be coding our logic in C#, make sure that you have a version of Godot with .NET enabled.

And of course, don’t forget that you can get the demo scene and all the assets for this example on my Github 🚀 with all my other Godot tutorials :)
Also, the assets are from Kenney’s library🚀
The tutorial is also available as a video — text version is below:
Oh and — by the way…
If you want to learn more about 2D tools for your future Godot 4/C# game projects, go ahead and check out my brand new “short-read” ebook: L’Almanach: Mini-2D Platformer!

This quick, practical guide will teach you the fundamentals of doing 2D games in this…