RVO Obstacles for gridgraph boundaries

So I have a GridGraph that overlays an island such that the grid stops at the shorelines. I want to add an RVO Obstacle now that outlines the boundaries of the graph to prevent my agents from getting pushed into the water.

There are a lot of ways to skin this cat, but before I embarked on this I figured it would be worthwhile to ask if there is an easy way to accomplish what I want given what already exists in the library.

Is there any method in the library that one can use to get an outline of a GridGraph; ideally in a certain order (clockwise or counter)? Any suggestions? Seems like something that would commonly be needed, so figured I woudl ask.


There is a user that made such a script some time ago.
I am not sure how well it works in the current version however, but you can try it.

Thanks Aron! I’ll check it out.

For now, because I am lazy, i am going to use erosion, but it woudl be cool if you could add some sort of OnAfterErosion() callback that contains the edges of the graph, because I imagine that at that point you would have it (not sure how erosion works though, so maybe I am wrong).

Or better yet, a component that adds RVOColliders as part of a post scan update. That would be super awesome.

1 Like