I am trying to build a system that detects if an agent is stuck.
One way is to check movement itself - if the agent barely moved in a while, it is likely stuck.
However, there are other cases, like agents running around, trying to find ways and not finding them - those cases have movement, but can be considered stuck anyway.
A safe bet would be to calculate the distance left to traverse in regular intervals. If that distance doesn't decrease noticeably in a while, the agent can probably be considered stuck.
But: How could I do that?
I would guess it could somehow be done with the corridor each agent has, or the corners.
However, I am having trouble coming up with a way to use these classes. It would be great if there was a "distanceLeft" function or something like that.