Line of sight: Difference between revisions
m (Fix lang template) |
(BlockLOS also works for some bots. Used BlockLOS image.) |
||
Line 1: | Line 1: | ||
{{lang|Line of sight}} | {{lang|Line of sight}} | ||
'''Line of sight''' (sometimes written line-of-sight or abbreviated to LoS) is an invisible straight line used to determine whether entities can see other entities in the world. | '''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 | 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 | 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 [[m_flFieldOfView]]. | |||
[[NPC]]s can only establish line of sight within their [[viewcone]], in turn established by the width of their [[ | |||
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>). | |||
[[File:Toolsblocklos.gif|left|link=tool texture#blocklos]] | |||
The [[tool texture#blocklos|Block LOS tool texture]] is specifically designed to block NPC LOS. Some [[bot]]s are also affected by this texture. | |||
{{clr}} | |||
==See also== | ==See also== | ||
Line 18: | Line 18: | ||
*[[NPC_FOV]] - A list of NPC [[m_flFieldOfView]] values. | *[[NPC_FOV]] - A list of NPC [[m_flFieldOfView]] values. | ||
*[[Talk:NPC_Sensing]] | *[[Talk:NPC_Sensing]] | ||
[[Category:Glossary]] | [[Category:Glossary]] |
Revision as of 05:06, 24 January 2022
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