Line of sight

From Valve Developer Community
(Redirected from LOS)
Jump to navigation Jump to search
English (en)Polski (pl)Русский (ru)Translate (Translate)

Line of sight (sometimes written line-of-sight or abbreviated to LoS or LOS) is an invisible straight line used to determine whether entities can see other entities in the world. If the line of sight is unobstructed from a viewer to a target, it is "established", and the game determines that the viewer can see the target.

LOS is blocked by all Solid geometry (Models, func detail brushes, etc.) unless the brush/model has a SolidMask that is NotSolid to LOS, i.e. Transparent.

Some prop physics do not block LOS. Use ai_debug_los to check which props.

NPCs can only establish line of sight within their viewcone, in turn established by the width of their Field of View, in turn established by the value of their m flFieldOfView.

NPCs can fire Outputs if it finds or loses line of sight to an enemy (OnFoundEnemy/OnLostEnemyLOS) or specifically the player (OnFoundPlayer/OnLostPlayerLOS).

Toolsblocklos.gif

The Block LOS tool texture is specifically designed to block NPC LOS. Some bots are also affected by this texture.

See also