I'm looking for solutions to a Line of Effect system I'm creating.
Specifically, I'm looking for a real-time algorithm that helps an AI unit find the closest tile in range that has a line of effect to its target
At the moment, I'm using raycasting (in Unity) to determine what tiles have lines of effect (no obstructions) to each other.
This information is then used by the AI to locate an unobstructed targeting position within range.
The end result is that every tile has a list of other tile locations it has a clear line of effect to.
The problem is that it takes forever to scan and makes the map far too static for my needs.
Anyone implement something similar?
Thanks