[SUPPORT] Advanced Turn Based Tile Toolkit

Hey , I’m working on implementing Line of Sight based visibility of enemy pawns. Most of it’s working fine, but I’d like your suggestion in one last area. By default, the enemy pawns are set to invisible if the player doesn’t have a line of sight to them. When a player unit moves through tiles which should technically grant a clear line of sight to an enemy unit, I’d like to make that particular enemy unit visible from the said tiles.

I figured that using ‘Find Tiles in Range’ for each tile in movement might be the most accurate approach, but may end up being a bit too costly. An alternative approach would be to have an invisible square/circle collision mesh that can detect enemy pawns during movement. If any enemy unit overlaps with the mesh during movement, we make them visible/hidden based on a line trace as well as whether they’re already visible from any other unit from player team. It will give clean results for square line of sight, but is a bit inaccurate if we go for Diamond line of sight. Maybe checking the distance to overlapped units and comparing with the range of the unit could take care of that situation as well.

It’s more of a hack approach as I really do not have any need for the storage of information regarding enemy pawns that the bot sees while it’s moving. Would you suggest any alternate approaches to handling this particular situation?