SightConeTrace( <sight position>, <ignore entity> )


Module: Trace

Summary:

Determines how much the entity can be seen from the given position, using the same check that is used by grenades. Performs multiple sight traces and returns an approximation to how much of the entity is visible from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially visible.



Call this on:

<entity> The entity to do the sight check against



Example:

visibilityAmount = player SightConeTrace( eye.origin, eye );



Required Args:

  • 1 : <sight position> The point the sight starts at


Optional Args

  • 1 : <ignore entity> An entity to ignore when doing the traces