Skip to main content

AgentDistanceFromTargetSettings

A class in Root.Township, Alta.Intelligence.

Settings for ActiveDistanceFromTarget: walk to a random reachable point found around the target, optionally the one most on the creature's own side. Server only.

Constructors​

MemberWhat it is
AgentDistanceFromTargetSettings()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private int bestDotOfBacking field for BestDotOf (default 3). Higher values cost more.
private int heuristicMaximumBacking field for HeuristicMaximum (default 20000).

Properties​

MemberWhat it is
int BestDotOf { get; }How many candidate points to compare, keeping the one furthest along the target-to-creature direction. 1 or less picks any point.
int HeuristicMaximum { get; }Search length passed to the pathfinder's constant path around the target, which limits how far away the point can be.

Methods​

MemberWhat it is
protected override IAction GetAction()Builds the shared ActiveDistanceFromTarget action, which uses a target.