---
title: obstacles
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkobstaclegraph/obstacles
---

# obstacles

The list of obstacle objects in the graph, each of which describes a polygon-shaped impassable area.

## Declaration

```swift
var obstacles: [GKPolygonObstacle] { get }
```

## See Also

### Working with Obstacles

- [addObstacles(_:)](gameplaykit/gkobstaclegraph/addobstacles(_:).md)
- [removeObstacles(_:)](gameplaykit/gkobstaclegraph/removeobstacles(_:).md)
- [removeAllObstacles()](gameplaykit/gkobstaclegraph/removeallobstacles().md)
- [nodes(for:)](gameplaykit/gkobstaclegraph/nodes(for:).md)
