How to prevent RVO agents from moving outside Recast/Navmesh graphs

  • A* version: 5.2.2
  • Unity version: 2023.3.35

Is there any way to enforce hard walls? We have frequent issues where agents keep falling off the world or walking through walls. Easiest way to test, is to set a target in a ~90 degree inner corner somewhere. Like a simple scene with a plane/cube acting as the floor/walkable surface for your recast graph. If you have a couple of agents (as few as 3 or 4), they will quickly start going off the navmesh and promptly fall off into the void.

The behavior is the same regardless if we’re using RichAI, or our own implementation that uses the RVOController component.

Hi

Do you have a screenshot of this?
I’m confused, because the RichAI movement script literally cannot leave the navmesh.

I have a video, though in it we’re using a bare combo of RVOController, Seeker, Funnel modifier and our own agent implementation. Video on google drive
Looks like agents trying to reach a crowded area pushes each other off.

In short our agent implementation has a update loop similar to BaseAI

  1. Calculate desired velocity based on current position and target (usually the next corner in the current path)
  2. Update RVO density behavior
  3. Setting the RVO target
  4. Calling RVO controller CalculateMovementDelta
  5. Apply result to the simulated position
  6. Sanity check new position (that its on both navmesh and physics collider surface)
  7. Update actual position

But you say you also get this behavior when using the RichAI movement script?

Yes, we initially used the RichAI component. Which exhibited the same issue. I’ll try to reproduce in a minimal setting when I get back to the office.