Skip to main content

Flee

Makes entities speed up and flee from their neighbors.

FleeJob

Internally, the behavior calculates a weighted sum of directions away from neigbhors. The weight of each neighbor is higher the closer it is and the more it is directly in front of the entity. The behavior gives this direction, and possibly an increased speed. The strengths and desired speed of the behavior grows larger the closer the neighbors are.

This behavior outputs the following:

  • DesiredDirection - Weighted sum of directions away from neigbhors.
  • DirectionDesire - From 0 to DirectionStrength, grows with the sum of the weights used for direction.
  • DesiredSpeed - From MinSpeed to MaxSpeed, grows with the sum of the weights used for direction.
  • SpeedDesire - From 0 to SpeedStrength, grows with the sum of the weights used for direction.
  • Priority - Priority (constant)

FleeComponent

  • Activation
    • ActivationP - Power for shaping the interpolation of DirectionDesire.
    • ActivationK - Second parameter for shaping the interpolation of DirectionDesire.
    • MinSpeed - The minimum desired speed to catch up with neighbors.
  • BaseData
    • MaxDistance - Maximum distance where neighbors will be detected.
    • MaxAngle - Maximum field of view angle where neighbors will be detected.
    • DirectionStrength - Multiplies DirectionDesire.
    • SpeedStrength - Multiplies SpeedDesire.
    • Priority - Priority.