Skip to main content

Keep Height

Makes the entities stay within a specified range of y coordinates. It can be for example useful to restrict how high the entities will fly.

KeepHeightJob

This behavior outputs the following:

  • DesiredDirection - Direction up or down back to the zone if y is outside MinY and MaxY.
  • DirectionDesire - From 0 to DirectionStrength as distance from either boundaries goes from 0 to CalmZoneHeight.
  • DesiredSpeed - 0 (constant)
  • SpeedDesire - 0 (constant)
  • Priority - Priority (constant)

KeepHeightComponent

The main interesting properties to adjust on KeepHeightComponent are:

  • MaxY - Maximum y coordinate of the entity.
  • MinY - Minimum y coordinate of the entity.
  • CalmZoneHeight - At this distance from either boundary, the behavior has maximum effect.
  • BaseData
    • DirectionStrength - Multiplies DirectionDesire.
    • Priority - Priority.