A* Pathfinding Project

How to access blocking collider for a specific node


#1

Hi,

I’m traversing through all nodes in a gridgraph to find out whether they are walkable or not. In addition i would like to know which objects are blocking an unwalkable node.

Does someone know if there is a build-in solution for that?


#2

Hi

The package has no idea what is blocking individual nodes, it is not even well defined in most cases. This is something you will have to write yourself in a separate script.
I’m not sure if the first part of your post was a question or just a statement?


#3

Thank you for the fast response.
The first part was just a statement :wink:

Is there some documentation about how the Scan process works technically?


#4

Not a deep technical description of it, no. What exactly are you wondering about?


#5

i just wanted to better understand the process to find out how to best get the objects that block the respective nodes.

i used to assume that the scan process used unitys raycasting to determine which nodes were blocked and which were free. now that i think about it, it’s more like a kind of depth testing, which determines the walkability of a node, isn’t it?

Anyway, i will find a solution.
Thanks for your time :slight_smile:


#6

It’s done using the Unity physics API. I guess it’s technically possible to make changes to that code to save the collider it hit. Might be easier for you to just make another physics check in your code though.