A* Pathfinding Project

Get all nodes with line of sight (Grid Graph)


#1

Hi, Is there any (optimized) method provided to get all nodes which have a free line of sight (!LineCast(node1, node2)) to a given node? Perhaps limited to some distance …
Much Thanks!
Regards


#2

Hi

There is nothing built-in for this.
However you can use https://arongranberg.com/astar/docs/pathutilities.html#BFS
together with https://arongranberg.com/astar/docs/gridgraph.html#Linecast to get something working pretty easily.