<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "swift: -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKGoal/init(toCohereWithAgents:maxDistance:maxAngle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKGoal(cm)goalToCohereWithAgents:maxDistance:maxAngle:::SYNTHESIZED::c:objc(cs)GKGoal"
  },
  "title" : "init(toCohereWithAgents:maxDistance:maxAngle:)"
}
-->

# init(toCohereWithAgents:maxDistance:maxAngle:)

```
convenience init(toCohereWithAgents agents: [GKAgent], maxDistance: Float, maxAngle: Float)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)