In general, steering behaviours write their results into one objective, whereby the TargetObjective
determines the objective where values are written in. It is important that the TargetObjective
index is valid. It is valid if it is in the range of [0, objective count - 1]. Otherwise, the behaviour cannot write any results and a warning is shown.
The following abstract example shall emphasize how the TargetObjective
can be used. Imagine a situation like in Figure 1 below. We have an agent which should collect interest objects while it (implicitly) should avoid danger objects. This can be achieved using only the Seek behaviour. The agent needs two different Seek behaviours: One perceives all interest objects and the other one all danger objects. The interest Seek is assigned to the first objective (TargetObjective
= 0) so that the first objective becomes interest for our agent, and the danger Seek is assigned to the second objective (TargetObjective
= 1) so that this objective becomes danger for our agent. The first objective is configured to be maximized because agents "wants interest" and the second to be minimized because the agent should avoid danger. Thus, the agent does not consider solutions which point towards directions where to much danger is, depending on the constraint for the second objective.
Figure 1: In this example, the Seek behaviour is attached twice to the blue agent. The two Seek behaviours have different TargetObjective
settings which result in the separation of the danger and interest magnitudes, as shown by the indicator gizmo at the top.
For more information about the basic concept and multi-critieria problems, see the corresponding quick start page.