Instance Property

gridPosition

The position of the node on a discrete integer grid.

Declaration

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 GKGraphfindPath(from:to:) method, read the position from each node to determine the path for an entity in your game scene to follow.