Creates a goal whose effect is to make an agent pursue the specified other agent, taking into account the target’s movement.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
An agent whose position affected agents will attempt to move toward.
The amount of time for which to predict the target agent’s movement.
A new goal object.
max parameter controls how far in the future the agent will plan to intercept its target. A larger value causes an affected agent to pursue its quarry more efficently, catching up with the target’s motion using fewer course corrections. A smaller value causes an affected agent to more closely follow the target’s current position despite the target’s current speed (and depending on the properties of the affected agent, it might not be able to move quickly enough to catch its target).