Skip to main content

AgentInteractApproachSettings

A class in Root.Township, Alta.Intelligence.

Settings for ActiveInteractApproach: follow the target until close, then start one of two follow-up actions depending on whether its height is in reach. Server only.

Constructors​

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

Fields​

7 private and internal fields
MemberWhat it is
private float arrivalDistanceBacking field for ArrivalDistance (default 0.1).
private ActionComponent canReachBacking field for CanReach.
private ActionComponent cantReachBacking field for CantReach.
private float giveUpDistanceBacking field for GiveUpDistance (default 10).
private float giveUpHurtMaximumBacking field for GiveUpHurtMaximum (default 0).
private float maximumRelativeHeightBacking field for MaximumRelativeHeight (default 1).
private float minimumRelativeHeightBacking field for MinimumRelativeHeight (default -1).

Properties​

MemberWhat it is
float ArrivalDistance { get; }How close the creature follows the target before checking the height and stopping.
ActionComponent CanReach { get; }Action started on the target when it's within the height range.
ActionComponent CantReach { get; }Action started on the target when it's too high or low. If null the approach just cancels.
float GiveUpDistance { get; }The action cancels when the remaining path is longer than this and the target hasn't hurt the creature more than GiveUpHurtMaximum.
float GiveUpHurtMaximum { get; }A target whose Hurt value is above this is never given up on for distance.
float MaximumRelativeHeight { get; }Highest the target can be above the creature on arrival and still count as reachable.
float MinimumRelativeHeight { get; }Lowest (most negative) the target can be relative to the creature and still count as reachable.

Methods​

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