Point anglesensor: Difference between revisions
Jump to navigation
Jump to search
m (Robot: fixing template case.) |
m (Robot: fixing template case.) |
||
Line 21: | Line 21: | ||
==Inputs== | ==Inputs== | ||
*{{ | *{{I Targetname}} | ||
*{{I Parentname}} | *{{I Parentname}} | ||
*{{I EnableDisable}} | *{{I EnableDisable}} |
Revision as of 19:37, 19 January 2009
Template:Wrongtitle Template:Base point
Entity Description
An entity that detects whether another entity points in a given direction for a period of time.
Keyvalues
- <target_destination> Name of the entity whose angles will be sensed.
- lookatname
- <target_destination> The entity we want to check to see if the Target Entity is looking at.
- duration
- <float> The amount of time the Target Entity must look at the 'Look at Entity' to trigger this entity, in seconds.
- tolerance
- <integer> The tolerance, in degrees, in the checking to determine when the Target Entity is looking at the Look At Entity.
Inputs
Parentname:
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string >
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string >
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
- EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
- 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 or OnNotFacingLookat output based on the result.
- SetTargetEntity <target_destination>
- Entity I should sense
Outputs
- Template:O targetname
- 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.
- Normalized value (0..1) where 1 is facing directly at target and 0 is at or beyond the angle of tolerance.