OBSTACLES
Obstacles
represent the physical limitations on where entities can move and
see, such as walls and scenery. Entities will automatically work
their way around defined obstacles to reach their intended
destination and use them as cover when appropriate. There are four
main types of obstacle that can be added to the AI system:
-
Full Height obstacles define an area that cannot been seen
over or passed through at any time and entities must always move
around it to see the other side.
- Half Height obstacles
define an area that cannot be passed through but can be seen over
whilst the entity is standing. Ducking entities cannot see over half
height obstacles, and also cannot be seen by others.
-
Boundary obstacles enclose an area beyond which an entity
cannot see or move, such as the bounds of a level. Therefore entities
can be restricted to the area within the boundary obstacle and cannot
move out of it. Only one boundary per container should be added to
prevent problems with multiple confining areas.
- View
Blocking obstacles are a special type of obstacle that does not
block movement, entities are free to move around as if the obstacle
didn't exist, but entities cannot see through it. As such these
obstacles do not affect the waypoint network and can be added and
removed efficiently whilst the system is in motion, allowing you to
use it to represent a closed door then remove it when the door is
opened.
Obstacles can be added to separate containers to
divide the world into enclosed sections. For example each floor of a
building can be represented by a container and the obstacles of each
floor are added to the relevant container, by default a single
container (0) is created to hold all obstacles and entities.
When
you have added all your obstacles you must call AI Complete
Obstacles to complete the setup and create waypoint and collision
data for all the obstacles. This does not include view blocking
obstacles which can be added and removed at any time without needing
this command.