RVO agents getting through diagonal wall gaps

I’ve seen this issue posted but years have passed since. This is a huge issue for me. If this happens in my game (and it could happen often) it would be catastrophic and break the game’s mechanics and how it’s intended to be played.

Please take a look at the following video:
RVO agents getting through diagonal wall gaps - YouTube

I’ve seen on the other post that you wrote:
“You could try tweaking the ‘wall thickness’ setting on the RVO Simulator component”

However, I could find no such setting on the RVO simulator component. Is there any way to prevent
or minimize this from happening?


Hmm. Probably what you have to do is to validate the agent’s movement each frame using a graph linecast. Something like:

void Update () {
    // Disable the AIs own movement code
    ai.canMove = false;
    Vector3 nextPosition;
    Quaternion nextRotation;
    // Calculate how the AI wants to move
    ai.MovementUpdate(Time.deltaTime, out nextPosition, out nextRotation);
    // Modify nextPosition and nextRotation in any way you wish
    if (AstarPath.active.data.gridGraph.Linecast(ai.position, nextPosition, null, out GraphHitInfo hit)) {
        nextPosition = hit.point;
    // Actually move the AI
    ai.FinalizeMovement(nextPosition, nextRotation);

I’m not 100% sure it will work perfectly, though.

See IAstarAI - A* Pathfinding Project
See GridGraph - A* Pathfinding Project