- 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
- Calculate desired velocity based on current position and target (usually the next corner in the current path)
- Update RVO density behavior
- Setting the RVO target
- Calling RVO controller CalculateMovementDelta
- Apply result to the simulated position
- Sanity check new position (that its on both navmesh and physics collider surface)
- 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.
I cant seem to reproduce the issue with just pure RichAI so I think we can ignore that part. Though trying to do it, I did a bit of a deep dive into the RichAI implementation and discovered that in the ClampToNavMesh method, there is some compensation if you end up outside the NavMesh (due to rounding errors etc). So I implemented a similar functionality in our own agent, and it seem to work so far. I guess I just expected the RVOController to not give deltas that could bring you off the navmesh.