<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKGridGraphNode/gridPosition",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKGridGraphNode(py)gridPosition"
  },
  "title" : "gridPosition"
}
-->

# gridPosition

The position of the node on a discrete integer grid.

```
var gridPosition: vector_int2 { get }
```

## Discussion

You specify the position only when creating a node.

When working with an array of nodes returned by the [`GKGraph`](/documentation/GameplayKit/GKGraph) [`findPath(from:to:)`](/documentation/GameplayKit/GKGraph/findPath(from:to:)) method, read the position from each node to determine the path for an entity in your game scene to follow.

---

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)