A set of options for how to place graph nodes when triangulating the graph.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
triangulate() method creates an internal model the empty space around the obstacles in the graph in the form of a polygon mesh. The mesh is generated such that the empty space divides into roughly even partitions, each of which is no more than a certain distance from an obstacle. After generating the mesh, the
triangulate() method adds nodes to the graph corresponding to locations in the mesh. This property controls which locations in the mesh become nodes in the graph.
GKMesh type is an option set: you can place nodes using multiple modes by combining the relevant constants with
Option syntax. Combining modes yields a denser graph, which can lead to slower pathfinding operations but smoother resulting paths. For best results, experiment with different modes and combinations to find the most natural style of movement for your game.