Skip to main content

ActiveFollow

A class in Root.Township, Alta.Intelligence.

Navigation action that follows the agent's target until within reach, or gives up when the target gets too far and hasn't hurt the agent enough.

Constructors​

MemberWhat it is
ActiveFollow()Creates an ActiveFollow with default values.

Fields​

1 private and internal field
MemberWhat it is
private float distanceSquared distance at which the target counts as reached.

Methods​

MemberWhat it is
override void Update(bool hasTarget)Cancels or stops without a target, gives up if too far and not hurt enough, finishes when close (unless overshooting).
protected override void OnStart()Picks a random reach distance and starts following the target; cancels with a warning if there's no target.