Contents, API Reference, Interfaces, iPath, advanceAlongWithCollisionInfo
Provides the same functionality as
but without requiring creation of an iAgent.
bool advanceAlongWithCollisionInfo(const iShape* shape, float distance, const iCollisionContext* context, float& precisionX, float& precisionY, cCollidingLine& collidingLine, iAgent*& agent);
The shape to use for checking collision.
This should normally be the same shape that was used to create this path.
The distance to advance along the path.|
The state of dynamic collision that will apply for this query.|
An empty context can be specified by passing a value of zero for this argument.
Extra precision for the x component of the path start is returned in this parameter.
Extra precision for the y component of the path start is returned in this parameter.
If there is a collision then this will be filled in to describe a line of first contact.
If there is a collision, and first contact is with an agent in the supplied collision context, this returns a pointer to the obstructing agent.
If there is no collision, this is set to zero.
Returns true if there was a collision, otherwise false.
Unless you have a specific reason for using this version of the advance along path functionality,
the versions provided by the Interface iAgent
interface should be preferred.
Refer to Advancing Along Paths for general information about PathEngine's built-in advance along path functionality.
bool advanceAlongWithCollisionInfo(Shape shape, float distance, CollisionContext context, out float precisionX, out float precisionY, out PathEngine.CollidingLine collidingLine, out Agent agent);
boolean advanceAlongWithCollisionInfo(Shape shape, float distance, CollisionContext context, float_OutArgument precisionX, float_OutArgument precisionY, Object_OutArgument collidingLine, Object_OutArgument agent);