Jump to content

Creating a grid system and pathfinding using A* in UE4 - ALL BLUEPRINTS

FaTaLMercenery
Go to solution Solved by FaTaLMercenery,

Went back, rewatched several of the videos, found two nodes that I had hooked up as CurrentTile when they should have been CurrentNeighbor.

So let me first start out by saying that I have been following a youtube playlist to create my code for this project and it is all in French. I do not speak French. I understand for the most part what each thing does and I've learned a surprising amount about UE4 from him despite the language barrier. So my issue currently has to do with the pathfinding using A*. For some reason, I am able to create paths on my grid from a start to a target with certain areas being unreachable by design. However, some of the areas which should be reachable are not reachable from certain tiles.

 

A link to pictures of the problem: https://imgur.com/a/G8GCV2b

 

You can see in both pictures that I am attempting to move to the same tile, but for one there is no path found and the other there is a path found because the start tile is different. The only tiles in this program which should give the result of "no path" are the red tiles and the one green tile enclosed by red tiles.

 

A link to my Github repository for the program: https://github.com/FaTaL6266/GridReposioty

 

I believe the fault is somewhere in the BP_Grid class and more specifically the FindPathToTarget function which is massive and I can't seem to locate what might be causing this. If anyone is able to look at the code and deduce the problem or give a suggestion, that would be great. In the mean time, I am going to continue digging through it to see if I can figure out the issue. If I can't find a solution, this isn't really going to absolutely make or break my plan, but I would like it to work properly.

 

P.S. I've also left a message for him on his youtube channel, but it hasn't been active in a year so my hopes of getting a response are not high.

Link to comment
Share on other sites

Link to post
Share on other sites

There's probably something wrong with how you connected your nodes.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Went back, rewatched several of the videos, found two nodes that I had hooked up as CurrentTile when they should have been CurrentNeighbor.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×