Class

GKObstacle

The abstract base class for objects representing impassable areas in a game world.

Declaration

class GKObstacle : NSObject

Overview

You do not use this class directly; instead, create instances of its concrete subclasses GKCircleObstacle, GKSphereObstacle, and GKPolygonObstacle. To make agents (GKAgent objects) avoid obstacles, create a goal with the goalToAvoidObstacles:timeBeforeCollisionToAvoid: method.

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

Relationships

Inherits From

Conforms To

See Also

Obstacles

class GKCircleObstacle

A circular impassable area to be avoided by agents.

class GKSphereObstacle

A spherical impassable volume to be avoided by agents.

class GKPolygonObstacle

A polygon-shaped impassable area in a 2D game world.