I have two disconnected graphs, a Recast Graph that represents the main walkable area, and a Point Graph that is a long twisting tube. The graphs are connected together by a NodeLink2. If the NodeLink2 and its end point Transform is too long, the agent (I’m using the AIPath class) will begin to traverse the link, then about halfway across, it stops and heads back to to the point where it started, then it turns around and tries again. It keeps bouncing back and forth indefinitely, unable to complete traversing the full the distance to reach the next graph. It seems that the distance between the end point transform and the NodeLink2 plays a role, because if I move it closer this behavior goes away.
This happens because the AIPath component doesn’t really understand off-mesh links. It will follow them, but it doesn’t know that it is following them. So if it happens to recalculate its path halfway across, then it will get confused and try to follow a new path starting from that point.
For better off-mesh link support, I would recommend the FollowerEntity. Though, of course, it doesn’t support moving along point graphs.
Thanks for the response! So, I would use the FollowerEntity, but unfortunately I need the point graph in this location because it’s actually a tunnel built at runtime that twists away at random angles (even straight up) and so doesn’t have a traditional walkable “down” surface that recast can map properly. Do you have any suggestions on how best to resolve this?
I believe you may just be able to turn off path recalculation during the off-mesh link traversal and then turn it on after it’s over, it sounds like? Worth a shot I’d imagine