removeObstacles(_:)
Removes the specified obstacle from the graph.
Declaration
func removeObstacles(_ obstacles: [GKPolygonObstacle])Parameters
- obstacles:
An array of obstacle objects to be removed from the graph.
Discussion
Adding or removing obstacles does not update the graph. The GKMeshGraph class adds, removes, and arranges nodes to describe the navigable areas around obstacles only when you call the triangulate() method. Typically, you add or remove several obstacles, then call the triangulate() method to update the graph.