Line-of-sight: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Fleshed out the article. It shouldn't be a stub now.)
(Added Outputs and moved some text about.)
Line 1: Line 1:
'''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. (If the line of sight is unobstructed from a viewer to a target, it is "established", and the game decides that the viewer can see the target.)
'''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. (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 is has a SolidMask that is NotSolid to LOS, ie Transparent.
 
The [[tool texture|Block LOS tool texture]] is specifically designed to block NPC LOS.


[[NPC]]s can only establish line of sight within their [[viewcone]], in turn established by the width of their [[FOV|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 [[FOV|field of view]], in turn established by the value of their [[m_flFieldOfView]].


LOS is blocked by all Solid geometry (Models, [[func_detail]] brushes, etc.) unless the brush/model is has a SolidMask that is NotSolid to LOS, ie Transparent.
NPCs can trigger [[Outputs#Outputs|Outputs]] if it finds or loses line of sight to an enemy (OnFoundEnemy/OnLostEnemyLOS) or specifically the player (OnFoundPlayer/OnLostPlayerLOS).
 
The [[tool texture|Block LOS tool texture]] is specifically designed to block LOS.





Revision as of 13:26, 1 February 2011

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. (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 is has a SolidMask that is NotSolid to LOS, ie Transparent.

The Block LOS tool texture is specifically designed to block NPC LOS.

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 trigger Outputs if it finds or loses line of sight to an enemy (OnFoundEnemy/OnLostEnemyLOS) or specifically the player (OnFoundPlayer/OnLostPlayerLOS).


See also