Clamping to Navmesh With RVO


#1

Hey there! I’m trying to clamp my RVO driven controllers to their Recast Graph and I’m running into some trouble.

If a bunch of my controllers all move into a corner at once, they can push each other over the edge of the navmesh (even with RVO Navmesh), causing one or more of them to fall beneath the navmesh.

I tried applying the NavmeshClamp script as well, with some success. Instead of falling beneath the navmesh, they simply get stuck on the edges.

Is there any way to avoid this? I thought the case of getting stuck on the edges might be tied to RVOControllers having a separate ‘center’ point, but my attempts to alter the NavmeshClamp script have been unsuccessful.


#2

Hi

Which version are you using?


#3

Unity: 5.6.1f1
Pathfinding Project: 3.8.1 (was reluctant to upgrade because of the controller change)


#4

Hi

Ok. The local avoidance in 3.8.x is not as good at keeping the agents inside the navmesh. You might have some luck with reducing the ‘Incompressibility’ setting on the RVOSimulator, but I’m not sure how much it will help.
The 4.x local avoidance is usually much better at keeping them on the navmesh even if they are pushed significantly (when using the RVONavmesh script).


#5

Ok, thank you. Do you have any documentation on how to upgrade from the legacy RVO controller to the new 4.0+ controller?

That’s the only reason I’ve avoided upgrading.


#6

Are you using one of the built-in movement scripts (e.g AIPath or RichAI)? If so, everything should work out of the box for almost all configurations.


#7

I wasn’t, but I have since switched to use the RichAI. The only thing I’m still stuck on is making a unit stop with RichAI.


#8

Ok. To make it simpler in the future, I’d then recommend upgrading to the beta, then you can use the new “isStopped” property. Settting that to true should make it slow down as quickly as possible.

Otherwise I would recommend setting the target of the AI to its current position which will also cause it to stop.


#9

Thanks aron. (20 char minimum)