DistanceWeighted
Weighted steering strategy where each steering action's weight is the inverse of the node's distance to the action's target. Closer targets yield higher weight. Actions without a target receive defaultWeight.
Parameters
the environment in which the node moves.
the owner of the steering action this strategy belongs to.
default weight for steering actions without a defined target.
Type Parameters
the concentration type.
Functions
actions are partitioned in group steering actions and non-group steering actions. The overall next position for each of these two sets of actions is computed via weighted sum. The resulting vectors are then summed together (with unitary weight).
If there's no SteeringActionWithTarget among the provided actions, a zero vector is returned. Otherwise, the closest target is picked.