PathEngine home previous: iMesh::addConstExternalRef()next: iMesh::addExternalRef()
Contents, API Reference, Interfaces, iMesh, addEndPoint



Adds an endpoint for use with the off-mesh connections feature.


int32_t addEndPoint(const cPosition& position);


position The position for the endpoint to add.
This must be a valid cPosition on this mesh.

Return Value

A unique index for the endpoint added.
(Endpoint indices start at zero for the first endpoint added and are then incremented.)
This index can subsequently be passed into iMesh::addOffMeshConnection() as either the source or target endpoint.


This method may not be called after collision or pathfinding preprocess has been generated or loaded for this mesh.

Any endpoints and connections on a mesh are saved out with the mesh when the mesh is saved.

See Off‑Mesh Connections for an overview of the off-mesh connection functionality, and Working with Off‑Mesh Connections for information about other methods relating to this functionality.

C# Mapping

int addEndPoint(PathEngine.Position position);

Java Mapping

int addEndPoint(Position position);

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