My enemy consists of Seeker, RichAI and RVOController. In the (not so seldom) case there are two enemies trying to reach the same target position, it happens very often that one of them, or both, do not reach the end of the path. (Which is bad in my game because they’re stuck now, forever thinking they’re walking.) I use this code to check if they reached the end of the path:
if (!richAI.pathPending && (richAI.reachedEndOfPath || !richAI.hasPath)) {
pathPending is false, hasPath is true and reachedEndOfPath is false. What can I do?