Instance Property


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


var gridOrigin: vector_int2 { get }


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

var diagonalsAllowed: Bool

A Boolean value that indicates whether nodes in the grid are connected to their diagonal neighbors.

var gridWidth: Int

The number of possible x-coordinates in the grid.

var gridHeight: Int

The number of possible y-coordinates in the grid.