PathEngine home previous: Ground Meshesnext: The PathEngine Movement Model
Contents, Overview, Fundamental Concepts, Obstacles


Obstacles in an environment can be represented either by cutting holes out of the ground mesh, or by placing shapes on the surface of that mesh.
Placed shapes have the advantage of being easier to update after content changes.

Some obstacles in game

The same obstacles as represented for pathfinding

Placed shapes are essentially two dimensional shapes, pinned to the surface of the ground mesh, but you can think of them as representing vertically extruded prisms.

The same environment, with obstacles drawn as vertically extruded prisms

Dynamic obstacles

In addition to being placed statically at mesh generation time, obstacles shapes can also be placed and moved completely dynamically at runtime.
In this case these are refered to as 'dynamic obstacles'.
The API provides sophisticated mechanisms for working with dynamic obstacles, with 'obstacle sets' for grouping obstacles, and 'collision contexts' controlling how these obstacles then apply to individual collision or pathfinding queries.

Dynamic obstacles can be used to manage changing states of the world, such as doors that open and close, but can also be used to represent the fact that some obstacles just do not apply to some agents, or to represent an agent's knowledge or beliefs about the world.

If a pathfinding agent is not aware of a blockage behind a wall (or the state of a door on the other side of a map or whatever) then this can be represented by excluding the corresponding obstacle from a collision context stored with that agent.
Pathfinding and collision queries against this collision context are then consistent with the agents knowledge of the world.
Agents can effectively 'communicate' knowledge about obstructions in the world in terms of operations on collision contexts.

Or perhaps low tables should be treated as obstacles for certain kinds of agents, whereas others are able to clamber over these tables and so effectively pass them without being obstructed.
This kind of situation can be handled by assigned different contexts to different categories of agents, with one context including the low tables, and the other not.
Collision and pathfinding queries then behave consistently with each agent's ability for movement through the world.

Projection of 3D geometry to placed shapes

PathEngine includes support for projecting 3D mesh geometry to ground shapes, based on a specified agent height.

Further information

Refer to this page for more information about content-time obstacle placement.
Refer to this page for more information about run-time obstacle management.

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: The PathEngine Movement Model