Returns the weight for the specified individual behavior’s influence on agents.
- iOS 10.0+
- macOS 10.12+
- tvOS 10.0+
An individual behavior already included in the composite behavior.
The weight applied to that behavior’s influence on an agent’s speed and direction, or
0 if that behavior is not in the composite behavior.
When an agent evaluates a composite behavior, it examines all goals across all of the individual behaviors it contains. For each goal, the agent calculates the change in direction and speed necessary to move toward fulfilling that goal (within the limits of the current time step and the agent’s maximum speed and turn rate). The agent then combines these influences to determine the total change in direction and speed for the current time step.
Weights modulate the effects of multiple goals in a behavior. Individual goals, or individual behaviors that group goals in a composite behavior, have more influence on an agent when given a greater weight.