PathEngine home | previous: | next: |
Fills a buffer with the set of agents in a given context overlapped by the given shape at the given position.
void getAllAgentsOverlapped(const iShape& shape, const iCollisionContext* context, const cPosition& position, tVector& overlappedAgents) const |
shape | The collision shape to use for this query. | ||
context |
The state of dynamic collision that will apply for this query. An empty context can be specified by passing nullptr for this argument. | ||
position | The position to be tested. This position must be a valid position on this mesh | ||
overlappedAgents |
(See |
This query is useful for implementing logic depending on collision between agents,
in the case where the agents don't need to actually impede each other's movement.
For example the context passed in may contain a set of floor switches in the world.
Once you have the set of overlapped agents a common technique is to use the 'user data'
stored with those agents to trigger any relevant consequences.
(See
void getAllAgentsOverlapped(Shape shape, CollisionContext context, PathEngine.Position position, out Agent[] overlappedAgents); |
Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEngine | next: |