Skip to main content

AgentMoveCloserSettings

A class in Root.Township, Alta.Intelligence.

Settings for ActiveAgentMoveCloser: slide the creature's rigidbody straight toward the target, without pathfinding, until it is a set distance away. Server only.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private float maxDistanceBeforeCancelSquaredBacking field for MaxDistanceBeforeCancelSquared (default 400, so 20 m).
private float reachedDistanceBacking field for ReachedDistance.
private float speedBacking field for Speed.

Properties​

MemberWhat it is
float MaxDistanceBeforeCancelSquared { get; }Squared distance to the target beyond which the action cancels.
float ReachedDistance { get; }How far from the target's ground position the creature stops.
float Speed { get; }Movement speed in metres per second, multiplied by the creature's "speed" stat if it has one.

Methods​

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