Instance Property

bufferRadius

The distance from obstacle edges that should also be considered impassable.

Declaration

@property(nonatomic, readonly) float bufferRadius;

Discussion

You set this property when creating a graph with the initWithObstacles:bufferRadius: initializer. Use the bufferRadius initializer parameter to take the size of potential travelers into account when determining navigability. After initialization, you can use this property to examine the buffer radius the graph was created with—for example, to draw a debugging overlay in your game UI that indicates passable and impassable areas.

See Also

Working with Nodes

- connectNodeUsingObstacles:

Adds the specified node to the graph, connecting it to its nearest neighbors without creating connections that pass through obstacles or their buffer regions.

- connectNodeUsingObstacles:ignoringObstacles:

Adds the specified node to the graph, connecting it to its nearest neighbors while ignoring the area occupied by the specified obstacles.

- connectNodeUsingObstacles:ignoringBufferRadiusOfObstacles:

Adds the specified node to the graph, connecting it to its nearest neighbors while ignoring the buffer regions around the specified obstacles.