1. NavTile
  2. Components
  3. NavTileAgent
  4. Conflict Handling

Conflict Handling

NavTiles contains a few methods of conflict handling, which can be used according to your needs.

Conflict handling is coupled with the NavTileAgent’s “agent type”. Custom agent types can be set in the agents tab in the NavTile Settings Window.

Disabled
When conflict handling is disabled, the agent freely moves through other agents.

Abort On Obstruction
A NavTileAgent with conflict handling set to Abort On Obstruction registers itself on the grid while traversing a path. Every time a new node is encountered, the agent checks the grid to determine whether that node is occupied, before moving to it. If the node is occupied, the NavTileAgent will abort its path. The OnPathAborted callback is invoked when this happens (you can learn more about the available callbacks on the advanced settings page).

The aforementioned check only takes agent types into account that have been marked to produce a conflict with this agent’s type. The conflict matrix on the agents tab in the NavTile Settings Window is used to specify which agent types produce conflicts when they run into each other.

Wait On Traversing Agent
Using this setting allows a NavTileAgent to wait before its next node is free. This NavTileAgent only waits if the NavTileAgent occupying its next node is moving. If the other NavTileAgent is standing still, the first NavTileAgent will abort its path instead. When this happens, the OnPathAborted callback is invoked.

Wait On Waiting Agent
A NavTileAgent with conflict handling set to Wait On Waiting Agent will wait on other waiting agents, in addition to the behavior exhibited when Wait On Traversing Agent is selected. If the next node is occupied by a waiting agent, the first agent will look ahead to determine what this waiting agent is waiting for. If a situation occurs where there is no possibility for the waiting agents to resolve, the first agent’s path is aborted and the OnPathAborted callback is invoked. If it seems like the situation will resolve itself, the first agent will keep waiting until its next node is free to move across.

How can we help?