Line of sight: Difference between revisions
(BlockLOS also works for some bots. Used BlockLOS image.) |
Thunder4ik (talk | contribs) m (Unicodifying) |
||
Line 2: | Line 2: | ||
'''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. | '''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, [[ | 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 [[ | Some [[prop physics]] do not block LOS. Use {{ent|ai_debug_los}} to check which props. | ||
[[NPC]]s 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 [[ | [[NPC]]s 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 [[Inputs and Outputs#Outputs|Outputs]] if it finds or loses line of sight to an enemy (<code>OnFoundEnemy/OnLostEnemyLOS</code>) or specifically the player (<code>OnFoundPlayer/OnLostPlayerLOS</code>). | NPCs can fire [[Inputs and Outputs#Outputs|Outputs]] if it finds or loses line of sight to an enemy (<code>OnFoundEnemy/OnLostEnemyLOS</code>) or specifically the player (<code>OnFoundPlayer/OnLostPlayerLOS</code>). | ||
Line 16: | Line 16: | ||
==See also== | ==See also== | ||
*[[ | *[[NPC FOV]] - A list of NPC [[m flFieldOfView]] values. | ||
*[[Talk: | *[[Talk:NPC Sensing]] | ||
[[Category:Glossary]] | [[Category:Glossary]] |
Latest revision as of 15:04, 7 January 2024
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
).
The Block LOS tool texture is specifically designed to block NPC LOS. Some bots are also affected by this texture.
See also
- NPC FOV - A list of NPC m flFieldOfView values.
- Talk:NPC Sensing