Sign in to follow this  
lucky6969b

Hierarchical pathfinding over several standalone areas?

Recommended Posts

lucky6969b    1330

Imagine there are several standalone areas which each one has its own navigation data, and they also possess a pivot. As I have created a system on a large open area called the suburb, and they have buildings erecting on it, these buildings also have navigation data.

The problem comes now, where the building and the suburb's pivots are both the same, and sitting on 0,0,0. I do this intentionally as I want to test whether the pathfinder can adapt to weird situation like this. When I raycast from building 0 where its pivot overlaps with the suburb's pivot, the raycast just won't get out of it and get to building 1 which is the destination....

Any ideas how to fix this?

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
ApochPiQ    23058
You have to represent the connectivity between the building and the "suburb" in the navigation data itself.

Depending on what type of navigation data you are using, this can range from trivial to mostly easy.

There should be no need to raycast to do path searches.

Share this post


Link to post
Share on other sites
lucky6969b    1330

Hello,

Initially, the hierarchical pf library was so good that I don't need to consider further ones. But when I read the documentation that has then stunned me, it said if I need to generate

a map for an area which spans several kilometers, and the small bounding box is just 2m by 2m, then it will generate 100 million bounding boxes to test its walkability. Then I think about it, and I decide to generate one set of data per "navigatable" area,and connect them thru portals.

That works great, and my question is how can I tell where the portals are. I am currently using the node which is closest to the source....But sometimes this calculated portal may be some area which is not walkable at all. Still thinking, anything to add? And what you said is just what I am talking about, to find where the connected portals are and must be precomputed for handiness.

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
ApochPiQ    23058
Your post is not very clear to me. Are you talking about doing pathfinding queries or are you talking about building a navigation data structure? They are related but different questions.

Share this post


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

Sign in to follow this