PathEngine home previous: iMesh::retrieveNamedObstacleByIndex()next: iMesh::saveBackgroundUnobstructedSpaceFor()
Contents, API Reference, Interfaces, iMesh, reversePath



Creates a reversed copy of a path.


std::unique_ptr<iPath> reversePath(iPath* path) const


path The path to reverse. This path must not include off-mesh connection segments.

Return Value

A newly created Interface iPath object, with positions in reverse order to the path passed in.


Note that path objects cache some state internally for the purposes of smooth position interpolation in advance along path methods, which is not included in the reversed path.

For convenience, you can pass a nullptr for the path argument (representing failure to reach a pathfinding destination), and in this case this method will then also return a nullptr (with no action).

See Also

iMesh::constructPath(), iMesh::copyPath()

C# Mapping

Path reversePath(Path path);

Java Mapping

Path reversePath(Path path);

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: iMesh::saveBackgroundUnobstructedSpaceFor()