A* Pathfinding Project

Get all nodes with line of sight (Grid Graph)


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!



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.