Documentation‎ > ‎

7. Line-of-Sight

This component sdds Line-of-Sight (LOS) filtering to TargetPRO components. Line of sight means events are based on whether or not a target can be "seen". This visibility test is done by ray casting against a given layer. If the ray is broken before hitting the target, the target is not in LOS.

If added to the same GameObject as a TargetTracker it can filter out any targets which are not currently in LOS.

If added to the same GameObject as a FireController it can prevent firing on any targets which are not currently in LOS.

Target Tracker Mask
Add layers to activate LOS filtering for a Target Tracker. If something is not in LOS, it will not be included in the targets list.

Fire Controller Mask
Add layers to activate LOS filtering for a Fire Controller. If something is not in LOS, it will be tracked but not fired upon.

LOS Test Mode
Use any debug leve to see lines to help visulize these settings)
Single Point
Will cast a single line to see if a target is in LOS

Six Point
Will cast 6 lines to simulate looking for exposed edges of a target. If any lines make it past obstacles, the target is in LOS. Set the radius to adjust the size of the area these lines scan.
Radius
Used with the Six Point mode to set a scan size.  

Debug Level
Set this to control the amount of information printed to the Unity Console to aid development. When on (any level) lines will be drawn to show the scan area.