DistanceSense
A class in Root.Township, Alta.Intelligence.
Sense asset giving the ground distance between the creature and a target. Height differences up to yFlexibility are ignored.
- Listed in Creatures and AI
- Inherits or implements
Sense - Derived types
DistanceSense.Create - Nested types
Create - Documented in Targets and senses
Constructors
| Member | What it is |
|---|---|
DistanceSense() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
1 private and internal field
Methods
| Member | What it is |
|---|---|
override float Get(IAgent requester, ITarget target) | The distance between the two ground positions, ignoring up to yFlexibility of height difference. |
override float GetInverseLerp(IAgent requester, ITarget target, float from, float to) | Maps the distance onto 0 to 1 between from and to, comparing squared distances first to skip the square root at the ends. |