PathEngine home previous: iCollisionContext::setSurfaceTypeTraverseCostDirection()next: iCollisionContext::updateCollisionPreprocessFor()
Contents, API Reference, Interfaces, iCollisionContext, temporarilyIgnoreAgent



Flags a specified agent as excluded from the context collision state, without invalidating cached state data.


void temporarilyIgnoreAgent(iAgent* agent);


agent The agent to ignore, which must currently be included in the context.


The main use case for this method is to nest queries inside matching calls to iCollisionContext::temporarilyIgnoreAgent() and iCollisionContext::restoreTemporarilyIgnoredAgent(), for agents that need to be temporarily excluded from the query state.

For example, this can be useful to prevent a target agent's collision shape from blocking queries made by an attacking agent.

The 'temporarily' in the name of this method refers to this most common expected use-case for the method, but there is no actual 'time limit' for ignoring agents in this way.
Agents should not be removed from the context whilst flagged as temporarily ignored, however, and the mechanism is designed for ignoring relatively small numbers of agents and so it may not be efficient to mark a lot of agents as ignored in this way.

Note that temporarily ignored agents are still considered to be 'included' in the context, (e.g. for iteration with iCollisionContext::getAgent(), testbed rendering, and so on), and are also not excluded when burning a collision context into the base mesh (with iMesh::burnContextIntoMesh()).

Note, also, that this method relates specifically to the agent as included directly in the collision context on which the method is called, and does not affect any obstacle sets which are added 'underneath' the collision context.
(If the agent being ignored is also added to such an obstacle set then marking the agent as ignored in the collision context will not prevent the agent from affecting collision and pathfinding state.)

See Also


C# Mapping

void temporarilyIgnoreAgent(Agent agent);

Java Mapping

void temporarilyIgnoreAgent(Agent agent);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iCollisionContext::updateCollisionPreprocessFor()