Environment Avoidance
Makes the entities avoid all collisions with the environment.
EnvironmentAvoidanceJob
Internally, the behavior calculates a weighted sum of hit normals. The weight of each hit is higher the closer it is, and the more it is directly in front of the entity. The behavior gives this direction. The strength of the behavior grows larger the closer the nearest hit is.
This behavior outputs the following:
DesiredDirection- Weighted sum of hits' normals.DirectionDesire-0toDirectionStrength, as distance to the nearest hit decreases.DesiredSpeed-0(constant)SpeedDesire-0(constant)Priority-Priority(constant)
EnvironmentAvoidanceComponent
BaseDataMaxDistance- Maximum distance where a hit will be detected.DirectionStrength- MultipliesDirectionDesire.Priority- Priority.