Skip to main content

DistanceSquaredSense

A class in Root.Township, Alta.Intelligence.

Sense asset giving the squared ground distance between the creature and a target, ignoring height differences up to yFlexibility.

Constructors​

MemberWhat it is
DistanceSquaredSense()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

1 private and internal field
MemberWhat it is
private float yFlexibilityHeight difference in metres that doesn't count towards the distance. Default 1.

Methods​

MemberWhat it is
override float Get(IAgent requester, ITarget target)The squared distance between the two ground positions.