I am using the NavMeshGraph for my game. Currently all I need from the A* path-finding project is the path found and then I deal with movement and collision on my own. It is working well so far as I am getting the path using seeker.StartPath method. The next step I am testing out is how off mesh links work. I am using NodeLink2 to create the links between mesh and it is also working as designed. My issue is that there is no way I can detect if my agent is traversing an offMeshLink. Since I want to perform special actions or check for conditions such as “Do not update path while traversing a Node Link”, I really need a way for the system to tell me that.
So my question is, from the path found is there a way to find out if a point on the path is a NodeLink or not? If not is there any quick solution I can add to the system to help me with that?
Note: I am using the Free version since I want to test offmeshlinks before purchasing.
Currently only the RichAI (for recast/navmesh-based graphs) movement script has “proper” support for off mesh links unfortunately.
The reason is that the other movement scripts operate by simply following a list of points, so the link to the nodes is not there anymore. You could make a script which instead follows the node positions (path array instead of vectorPath), then you could simply check for “if (nextNode is NodeLink2)”.
I want to improve that part of the system in the future.
The new FollowerEntity movement script has good support for off-mesh links.
You can for example use properties like ai.offMeshLink, ai.currentNode, ai. isTraversingOffMeshLink and methods like ai.GetRemainingPath (there’s an overload that returns all off-mesh links in the remaining path).
Thank you for answer.
I checked. The problem is for me now, ai should move snap to grid. I was using AILerp before.
Is it possible to move like that with FollowerEntity?
I should update AILerp then for NodeLink2. Am I right?
Because I want to use TeleportLink. But ai can not go the other link when it came a link.
Can I do that with grid graph?
Yes, I suppose so.
The AILerp will traverse off-mesh links at the moment, but it does not track them. So it does not know that it is traversing an off-mesh link.