Contents

GKCircleObstacle

A circular impassable area to be avoided by agents.

Declaration

class GKCircleObstacle

Overview

To make agents (GKAgent objects) avoid obstacles, create a goal with the init(toAvoid:maxPredictionTime:) method. Agents affected by an avoid-obstacles goal will attempt to move such that their radius never overlaps that of a circular obstacle.

To learn more about using goals and agents, see Agents, Goals, and Behaviors in GameplayKit Programming Guide.

Topics

Creating an Obstacle

Placing an Obstacle

See Also

Obstacles