Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
The Message template has been deleted. A list of pages that transclude it are at Valve Developer Community:Message transclusions.
point_anglesensor
point_anglesensor
is a point entity available in all Source games.
It detects whether another entity points in a given direction for a period of time.
Contents
KeyValues
- Target Entity Name
(target)
<targetname> - Name of the entity whose angles will be sensed.
- Look At Entity
(lookatname)
<targetname> - The entity we want to check to see if the Target Entity is looking at.
- Duration
(duration)
<float> - The amount of time the Target Entity must look at the 'Look at Entity' to trigger this entity, in seconds.
- Tolerance
(tolerance)
<integer> - The tolerance, in degrees, in the checking to determine when the Target Entity is looking at the Look At Entity.
EnableDisable:
- Start Disabled
(StartDisabled)
<boolean> - Stay dormant until activated (with the
Enable
input).
Targetname:
- Name
(targetname)
<string> - The targetname that other entities refer to this entity by.
Flags
- [
1
] : Use target entity's angles (NOT position)
Inputs
Toggle
- Toggle the sensor between enabled and disabled.
Test
- Check to see if the Target Entity is facing the Look At Entity within the specified tolerance, firing either the
OnFacingLookat
orOnNotFacingLookat
output based on the result.
EnableDisable:
Enable
Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
TargetDir
<vector>- Fired when the forward direction of the Target Entity changes. Passes the new forward direction as a parameter.
OnFacingLookat
- Fired when the Target Entity points at the Look At Entity for more than the specified Duration, or in response to a
Test
input.
OnNotFacingLookat
- Fires in response to a
Test
input when the Target Entity is not pointing at the Look At Entity.
FacingPercentage
<float>- Normalized value (0..1) where 1 is facing directly at target and 0 is at or beyond the angle of tolerance.