<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKMeshGraph/triangulationMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMeshGraph(py)triangulationMode"
  },
  "title" : "triangulationMode"
}
-->

# triangulationMode

A set of options for how to place graph nodes when triangulating the graph.

```
var triangulationMode: GKMeshGraphTriangulationMode { get set }
```

## Discussion

The [`triangulate()`](/documentation/GameplayKit/GKMeshGraph/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()`](/documentation/GameplayKit/GKMeshGraph/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.

The [`GKMeshGraphTriangulationMode`](/documentation/GameplayKit/GKMeshGraphTriangulationMode) type is an option set: you can place nodes using multiple modes by combining the relevant constants with <doc://com.apple.documentation/documentation/Swift/OptionSet> syntax, or bitwise OR operations in Objective-C. 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)