---
title: "node(atGridPosition:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkgridgraph/node(atgridposition:)"
---

# node(atGridPosition:)

Returns the node in the graph at the specified grid coordinates.

## Declaration

```swift
func node(atGridPosition position: vector_int2) -> NodeType?
```

## Parameters

- `position`: The grid location to query.

## Return Value

Return Value The grid node at the specified location, or nil if there is no node at that location.

## Discussion

Discussion This method finds nodes that are part of the grid created by the graph. You can attach other nodes to the graph (for example, to represent the positions of game entities in the grid) with the connectToAdjacentNodes(node:) method, but such nodes are not part of the grid itself.

## See Also

### Working with Nodes

- [connectToAdjacentNodes(node:)](gameplaykit/gkgridgraph/connecttoadjacentnodes(node:).md)
