A* Pathfinding Project

What is wrong with my A* project


#1

11 3

Just like the image shows, some nodes near the target nodes seem to be wrong… Does anybody know how to solve it? Thanks


#2

Hey,

I don’t really understand what I’m looking at, would you mind sharing a bit more details about what graph you’re using what modifiers etc,?

Thank you, Wolf


#3

Hey,
Thanks for the reply… I Use Navmesh Graph and Funnel modifier ,and use Unwrap in modifier, split at every portal is not selected.

Please let me know if you want other infomations .

#4

Maybe i didn’t clearly explain my confuse. What i want to show in the images above is to express that for different destinations, as you see in the left image and the right image,the A* return different nodes near the destination. As you can see ,the nodes i encircle in the left image are seem to be wrong…


#5

Hey,

Thanks for clearing up the confusion.

I’m not 100% sure why this happens, but due to the amount of nodes and the way the funnel works for navmesh graph is a bit tricky. The debug view isn’t always accurate to what the agent will be traveling.

While the agent is walking it will update the path and it should look okey.

Aron will be able to give you a clearer answer. But he is currently on holiday.

I’m linking a recent similar forum post that might help:


#6

Test1 Test2

Thanks for your reply… As what i say above, i am wondering that maybe there is a bug in Funnel algorithm ?Because you can see the image i just attached above, i only adjust my target point left or right,then the nodes returned to me are very different.These point are drawed by the vectorPath returned by the path,so if these node seem to be wrong,then my agent will not go in shortest path…


#7

Perhaps the raycast Modifier could help you out here.


#8

By the way,those red points are from the vectorPath returned by the path,those white points are from the lerp points drawed just for gamers looking


#9

thanks, i will take a try for it…


#10

i tried raycast modifier, but i am using navmesh graph,the result seems to be ugly…
tt1 tt2


#11

Hmm, I’m sorry I think you’ll have to wait for Aron to comeback and see what he has to say. Sorry for the inconvenience


#12

Ok, but still thank you for the time …


#13

Hi

Sorry for the late answer. I am currently traveling and I lost my laptop on a flight, so I haven’t been able to work for a while.

Do you think you could show a screenshot of your navmesh around that area with the “Show Outline” option enabled?


#14

Hi aron,
I just attached the screenshot of the navmesh around the area which has the problem. If you have other needs , please tell me. Thanks!!


#15

Hi

It might be that some of your triangle edges do not line up with the adjacent ones?

In any case, you could make some significant improvements to that navmesh. Having lots of skinny triangles in a navmesh often leads to a very bad path quality. You want them to be as even as possible (close to a https://en.wikipedia.org/wiki/Delaunay_triangulation). In your modeling tool, see if you can find a way to improve the triangulation so that they are not as skinny anymore.


#16

Ok, thanks for your answer !!