Contents, API Reference, Interfaces, iCollisionInfo, getCollidingAgent
iCollisionInfo::getCollidingAgent()
Description
Returns the agent, if an agent caused the collision.
Syntax
iAgent* getCollidingAgent() const; |
Return Value
If the collision was with another agent then this function returns a pointer to that agent.
Otherwise
this function returns a null pointer,
indicating that the collision was with an external edge of the mesh.
Remarks
The iCollisionInfo simply stores a pointer to the agent in question.
If that agent in question is deleted in between the firstCollision() call that created this iCollisionInfo object and
the call to this function then the agent pointer will be invalid and must not be used.