---
title: gridOrigin
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkgridgraph/gridorigin
---

# gridOrigin

The lowest x- and y-coordinates that appear in the grid.

## Declaration

```swift
var gridOrigin: vector_int2 { get }
```

## Discussion

Discussion You specify origin, width, and height when creating a grid graph with the init(fromGridStartingAt:width:height:diagonalsAllowed:) initializer. After initialization, you can use this property to examine the parameters the graph was created with—for example, to draw the grid as a debugging overlay in your game UI.

## See Also

### Inspecting a Graph

- [diagonalsAllowed](gameplaykit/gkgridgraph/diagonalsallowed.md)
- [gridWidth](gameplaykit/gkgridgraph/gridwidth.md)
- [gridHeight](gameplaykit/gkgridgraph/gridheight.md)
