A* Pathfinding question

Hello there,

I’m trying to implement the A* plugin into this tutorial since you suggested it.
However, I cannot for the life of me get the Unit’s to stop walking through my walls.
I did follow the level creation and object implementation tutorials to make sure things were set properly.

I did make sure to follow the quick start tutorial on A*s site as well as using CodeMonkey’s tutorial.

I’m assuming all I need are the scripts from A* and nothing from here.
I have no pathfinding scripts made up from this tutorial btw, so Im hoping that doesn’t matter.

1 Like

Make sure you’re using the right graph, that asset has tons of graph types, from 2D to 3D. I included a quick getting started guide in the end of my review video The PERFECT Pathfinding! - Code Monkey
Basically you just need the Grid in that tool to be with the exact same shape/size as the GridSystem in the game.
That tool uses the same logic for identifying walkable and unwalkable areas as I used in the course code, it does a Raycast, so it should work pretty much exactly the same.

1 Like

So I’ve been trying everything, they still walk through walls and the grid we made here still shows up and such. What would I need to do for a 3D top down game like this?

Do the walls have Colliders? Are they inside the A* Pathfinding bounds? What happens when you click on Scan? Look at the video I posted at 04:00
That’s really all you need to do, that and make sure the grid shape matches.

1 Like

Privacy & Terms