Skip to main content

Avoid Ground

Makes the entities avoid ground.

AvoidGroundJob

The behavior expects that the ray query cast rays downwards. It can work with multiple rays, but a single ray downward using the DownSingleCreateRaysJobWrapper should be sufficient. The behavior always gives direction straight up. The strength grows as the distance to the closest hit decreases.

This behavior outputs the following:

  • DesiredDirection - new float(0, 1, 0) (constant)
  • DirectionDesire - From 0 to DirectionStrength as minimum distance to hit goes from MaxDistance to 0.
  • DesiredSpeed - 0 (constant)
  • SpeedDesire - 0 (constant)
  • Priority - Priority (constant)

AvoidGroundComponent

  • BaseData
    • MaxDistance - Maximum distance where a hit will be detected.
    • DirectionStrength - Multiplies DirectionDesire.
    • Priority - Priority.