- Home /
The question is answered, right answer was accepted
A* Pathfinding Project Problem with Obstacles
I'm using the A* Pathfinding Project (http://arongranberg.com/astar/) for navigation in my "game". I'm having a few issues and some pointers about where to look would be very useful.
Firstly the object that I want to use to block navigation is only partially recognised, with some of the waypoints going through it. For example:
The right hand side of the block in the middle doesn't remove the grid nodes. The scale I'm using for the world is that the node size is 100, and I'm using a Ray length of 1000 for the height testing, which might be something to do with it, as all the tutorials I've seen rely on a smaller world.
Also when I run unity, the seeker seems to stop soon after moving. Although I think that may be related to problems with generating the grid. I'm mostly using code borrowed from this tutorial: http://www.youtube.com/watch?v=bkCLqPpopvE but with my own custom mesh for the ground and the scales increased.
Any help would be much appreciated.
It would help us if you could post the code you used for the implementation of the A*.
Answer by SteveSync · Oct 22, 2013 at 07:32 PM
I managed to find the solution. I enabled "Thick Raycast" in Height testing and it cleared up the issue. I also found out why the little guy wasn't making it to the end of the level, which was that he had two colliders that were interfering each other. I didn't realise that the character controller was also a collider. Doh.
Answer by Cherno · Oct 22, 2013 at 06:59 PM
Try moving the obstacle a littel bit down so that it goes right through the grid instead of just barely touching it, and see if that helps.
Other than that, I suggest to ask directly in Aron's own forum, he is very helpful and will certainly have the right answer.
BTW, you can modify the grid code easily to include raycasting between nodes just like in point graphs, take a look here:
http://www.arongranberg.com/vanillaforums/discussion/690/gridgraph-connection-blocking
This way you can have thin walls that block connections instead of having to place the walls on nodes.
Follow this Question
Related Questions
Astar Pathfinding not scanning graph 0 Answers
A* Algorithm Node Grid Generation 2 Answers
A* Pathfinding Turn Off Rotation 2 Answers
A* PathFinding Radius sphere 1 Answer
How can i take the right path in this pathfind algorithm? 0 Answers