Hi, we’re trying to use off mesh node links to handle doorway transitions in our new game, which seems to be working pretty well apart from one situation. When following a path where the last part of the path is the off-mesh node link the AI traverses the link and then endlessly cycles back to the start of the link and traverses it again.
A few more details:
We’re using the default TraverseOffMeshLinkFallback routine (before writing out own custom one).
The path is a RandomPath that we feed into the RichAI.
We’ve taken a look at the code and can’t quiet figure out what’s going wrong but have made a few observations:
At the time the traversal corouting completes, RichAI.reachedDestination is false because reachedEndOfPath is false becuase approachingPathEndpoint is false because approachingPartEndpoint is false because lastCorner is false.
Not quite sure what lastCorner is supposed to indicate or why it isn’t being set to true.
Any insights on what we might be doing wrong would be much appreciated. Or maybe the off mesh link fallback just doesn’t handle this case in which case we’d love to know how to fix that!
Thanks to your info I found a bug in the richAI script when the path ended at an off mesh link.
I have uploaded beta version 4.3.24 now which fixes this.