Basic Breadth First Search PathFinding Test

I remade pathfinding system a bit because I couldn’t understand how to connect actual gameobjects in game and Node class. It’s hard to absorb that there are “virtual” objects with 2D coordinates that actually connected to gameobjects in 3D space.

So I made pathfinding script runs through Vector2Int coordinates, they actually are linking map(grid) prefabs and Tile class (I renamed Node). I didn’t made “reached” Dictionary, I checked grid dictionary to exclude tiles that are already connected. And it seems to be working)

5 Likes

The older version of the course, (not sure if newer students have access to it) had a very similar approach to what you created, in case you want to check that out.

1 Like

I’m just glad that I understand how it works)

Privacy & Terms